use of org.apache.asterix.external.operators.ExternalIndexBulkModifyOperatorDescriptor in project asterixdb by apache.
the class SecondaryIndexOperationsHelper method createExternalIndexBulkModifyOp.
protected ExternalIndexBulkModifyOperatorDescriptor createExternalIndexBulkModifyOp(JobSpecification spec, int[] fieldPermutation, IIndexDataflowHelperFactory dataflowHelperFactory, float fillFactor) throws AlgebricksException {
// create a list of file ids
int numOfDeletedFiles = 0;
for (ExternalFile file : externalFiles) {
if (file.getPendingOp() == ExternalFilePendingOp.DROP_OP) {
numOfDeletedFiles++;
}
}
int[] deletedFiles = new int[numOfDeletedFiles];
int i = 0;
for (ExternalFile file : externalFiles) {
if (file.getPendingOp() == ExternalFilePendingOp.DROP_OP) {
deletedFiles[i] = file.getFileNumber();
}
}
ExternalIndexBulkModifyOperatorDescriptor treeIndexBulkLoadOp = new ExternalIndexBulkModifyOperatorDescriptor(spec, dataflowHelperFactory, deletedFiles, fieldPermutation, fillFactor, false, numElementsHint);
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, treeIndexBulkLoadOp, secondaryPartitionConstraint);
return treeIndexBulkLoadOp;
}
Aggregations