Search in sources :

Example 1 with BlockMapBuilder

use of org.apache.drill.exec.store.schedule.BlockMapBuilder in project drill by apache.

the class EasyGroupScan method initFromSelection.

private void initFromSelection(FileSelection selection, EasyFormatPlugin<?> formatPlugin) throws IOException {
    @SuppressWarnings("resource") final DrillFileSystem dfs = ImpersonationUtil.createFileSystem(getUserName(), formatPlugin.getFsConf());
    this.selection = selection;
    BlockMapBuilder b = new BlockMapBuilder(dfs, formatPlugin.getContext().getBits());
    this.chunks = b.generateFileWork(selection.getStatuses(dfs), formatPlugin.isBlockSplittable());
    this.maxWidth = chunks.size();
    this.endpointAffinities = AffinityCreator.getAffinityMap(chunks);
}
Also used : DrillFileSystem(org.apache.drill.exec.store.dfs.DrillFileSystem) BlockMapBuilder(org.apache.drill.exec.store.schedule.BlockMapBuilder)

Aggregations

DrillFileSystem (org.apache.drill.exec.store.dfs.DrillFileSystem)1 BlockMapBuilder (org.apache.drill.exec.store.schedule.BlockMapBuilder)1