use of org.apache.asterix.external.operators.ExternalScanOperatorDescriptor in project asterixdb by apache.
the class ExternalIndexingOperations method getIndexingOperator.
/**
* This method create an indexing operator that index records in HDFS
*
* @param jobSpec
* @param itemType
* @param dataset
* @param files
* @param indexerDesc
* @return
* @throws AlgebricksException
* @throws HyracksDataException
* @throws Exception
*/
private static Pair<ExternalScanOperatorDescriptor, AlgebricksPartitionConstraint> getIndexingOperator(MetadataProvider metadataProvider, JobSpecification jobSpec, IAType itemType, Dataset dataset, List<ExternalFile> files, RecordDescriptor indexerDesc) throws HyracksDataException, AlgebricksException {
ExternalDatasetDetails externalDatasetDetails = (ExternalDatasetDetails) dataset.getDatasetDetails();
Map<String, String> configuration = externalDatasetDetails.getProperties();
IAdapterFactory adapterFactory = AdapterFactoryProvider.getIndexingAdapterFactory(metadataProvider.getApplicationContext().getServiceContext(), externalDatasetDetails.getAdapter(), configuration, (ARecordType) itemType, files, true, null);
return new Pair<>(new ExternalScanOperatorDescriptor(jobSpec, indexerDesc, adapterFactory), adapterFactory.getPartitionConstraint());
}
Aggregations