configure an adapter before asking for the output type
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
index d7eed24..c09bada 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/feeds/FeedUtil.java
@@ -212,8 +212,7 @@
return altered;
}
-
-
+
public static Pair<IAdapterFactory, ARecordType> getFeedFactoryAndOutput(Feed feed,
MetadataTransactionContext mdTxnCtx) throws AlgebricksException {
@@ -243,14 +242,14 @@
switch (adapterFactory.getAdapterType()) {
case TYPED:
- adapterOutputType = ((ITypedAdapterFactory) adapterFactory).getAdapterOutputType();
((ITypedAdapterFactory) adapterFactory).configure(configuration);
+ adapterOutputType = ((ITypedAdapterFactory) adapterFactory).getAdapterOutputType();
break;
case GENERIC:
+ ((IGenericAdapterFactory) adapterFactory).configure(configuration, (ARecordType) adapterOutputType);
String outputTypeName = configuration.get("output-type-name");
adapterOutputType = (ARecordType) MetadataManager.INSTANCE.getDatatype(mdTxnCtx,
feed.getDataverseName(), outputTypeName).getDatatype();
- ((IGenericAdapterFactory) adapterFactory).configure(configuration, (ARecordType) adapterOutputType);
break;
default:
throw new IllegalStateException(" Unknown factory type for " + adapterFactoryClassname);