PhysicalPlanReader ppr = new PhysicalPlanReader(CONFIG, CONFIG.getMapper(), DrillbitEndpoint.getDefaultInstance());
Fragment fragmentRoot = getRootFragment(ppr, fragmentFile);
PlanningSet planningSet = StatsCollector.collectStats(fragmentRoot);
SimpleParallelizer par = new SimpleParallelizer(1000*1000, 5, 10, 1.2);
List<DrillbitEndpoint> endpoints = Lists.newArrayList();
DrillbitEndpoint localBit = null;
for(int i =0; i < bitCount; i++){
DrillbitEndpoint b1 = DrillbitEndpoint.newBuilder().setAddress("localhost").setControlPort(1234+i).build();
if(i ==0) localBit = b1;
endpoints.add(b1);
}
QueryWorkUnit qwu = par.getFragments(new OptionList(), localBit, QueryId.getDefaultInstance(), endpoints, ppr, fragmentRoot, planningSet);