@Override public void initialize(InputSplit inputSplit, TaskAttemptContext taskAttemptContext)
throws IOException, InterruptedException {
distributable = (DataMapDistributableWrapper) inputSplit;
if (invalidSegments.size() > 0) {
DataMapStoreManager.getInstance().clearInvalidSegments(table, invalidSegments);
}
TableDataMap tableDataMap = DataMapStoreManager.getInstance()
.getDataMap(table, distributable.getDistributable().getDataMapSchema());
if (isJobToClearDataMaps) {
DataMapStoreManager.getInstance()
.clearDataMaps(table.getCarbonTableIdentifier().getTableUniqueName());
SegmentPropertiesAndSchemaHolder.getInstance()
.invalidate(table.getAbsoluteTableIdentifier());
blockletIterator = Collections.emptyIterator();
return;
}
dataMaps = tableDataMap.getTableDataMaps(distributable.getDistributable());
List<ExtendedBlocklet> blocklets = tableDataMap
.prune(dataMaps,
distributable.getDistributable(),
dataMapExprWrapper.getFilterResolverIntf(distributable.getUniqueId()), partitions);
for (ExtendedBlocklet blocklet : blocklets) {
blocklet.setDataMapUniqueId(distributable.getUniqueId());
}
blockletIterator = blocklets.iterator();
}