use of org.apache.asterix.external.api.IIndexibleExternalDataSource in project asterixdb by apache.
the class GenericAdapterFactory method configure.
@Override
public void configure(IServiceContext serviceContext, Map<String, String> configuration) throws HyracksDataException, AlgebricksException {
this.configuration = configuration;
IApplicationContext appCtx = (IApplicationContext) serviceContext.getApplicationContext();
ExternalDataUtils.validateDataSourceParameters(configuration);
dataSourceFactory = DatasourceFactoryProvider.getExternalDataSourceFactory(appCtx.getLibraryManager(), configuration);
if (dataSourceFactory.isIndexible() && (files != null)) {
((IIndexibleExternalDataSource) dataSourceFactory).setSnapshot(files, indexingOp);
}
dataSourceFactory.configure(serviceContext, configuration);
ExternalDataUtils.validateDataParserParameters(configuration);
dataParserFactory = ParserFactoryProvider.getDataParserFactory(appCtx.getLibraryManager(), configuration);
dataParserFactory.setRecordType(recordType);
dataParserFactory.setMetaType(metaType);
dataParserFactory.configure(configuration);
ExternalDataCompatibilityUtils.validateCompatibility(dataSourceFactory, dataParserFactory);
configureFeedLogManager();
nullifyExternalObjects();
}
Aggregations