public void testOneIgfsSplitAffinity() throws Exception {
  IgfsMock igfs=LocationsBuilder.create().add(0,NODE_1).add(50,NODE_2).add(100,NODE_3).buildIgfs();
  List<HadoopInputSplit> splits=new ArrayList<>();
  splits.add(new HadoopFileBlock(new String[]{HOST_1},URI.create("igfs://igfs@/file"),0,50));
  final int expReducers=4;
  HadoopPlannerMockJob job=new HadoopPlannerMockJob(splits,expReducers);
  IgniteHadoopWeightedMapReducePlanner planner=createPlanner(igfs);
  HadoopMapReducePlan plan=planner.preparePlan(job,NODES,null);
  assert plan.mappers() == 1;
  assert plan.mapperNodeIds().size() == 1;
  assert plan.mapperNodeIds().contains(ID_1);
  checkPlanMappers(plan,splits,NODES,false);
  checkPlanReducers(plan,NODES,expReducers,false);
}

public void testOneIgfsSplitAffinity ( ) throws Exception { IgfsMock igfs = LocationsBuilder . create ( ) . add ( 0 , NODE_1 ) . add ( 50 , NODE_2 ) . add ( 100 , NODE_3 ) . buildIgfs ( ) ; List < HadoopInputSplit > splits = new ArrayList < > ( ) ; splits . add ( new HadoopFileBlock ( new String [ ] { HOST_1 } , URI . create ( "igfs://igfs@/file" ) , 0 , 50 ) ) ; final int expReducers = 4 ; HadoopPlannerMockJob job = new HadoopPlannerMockJob ( splits , expReducers ) ; IgniteHadoopWeightedMapReducePlanner planner = createPlanner ( igfs ) ; HadoopMapReducePlan plan = planner . preparePlan ( job , NODES , null ) ; assert plan . mappers ( ) == 1 ; assert plan . mapperNodeIds ( ) . size ( ) == 1 ; assert plan . mapperNodeIds ( ) . contains ( ID_1 ) ; checkPlanMappers ( plan , splits , NODES , false ) ; checkPlanReducers ( plan , NODES , expReducers , false ) ; }
test one igfs split being assigned to affinity node .
