Search in sources :

Example 1 with IIndexibleExternalDataSource

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();
}
Also used : IIndexibleExternalDataSource(org.apache.asterix.external.api.IIndexibleExternalDataSource) IApplicationContext(org.apache.asterix.common.api.IApplicationContext)

Aggregations

IApplicationContext (org.apache.asterix.common.api.IApplicationContext)1 IIndexibleExternalDataSource (org.apache.asterix.external.api.IIndexibleExternalDataSource)1