public void testReduceTask() throws Exception {
  HadoopJob gridJob=getHadoopJob(igfsScheme() + PATH_INPUT,igfsScheme() + PATH_OUTPUT);
  runTaskWithInput(gridJob,HadoopTaskType.REDUCE,0,"word1","5","word2","10");
  runTaskWithInput(gridJob,HadoopTaskType.REDUCE,1,"word3","7","word4","15");
  assertEquals("word1\t5\n" + "word2\t10\n",readAndSortFile(PATH_OUTPUT + "/_temporary/0/task_00000000-0000-0000-0000-000000000000_0000_r_000000/" + getOutputFileNamePrefix()+ "00000"));
  assertEquals("word3\t7\n" + "word4\t15\n",readAndSortFile(PATH_OUTPUT + "/_temporary/0/task_00000000-0000-0000-0000-000000000000_0000_r_000001/" + getOutputFileNamePrefix()+ "00001"));
}

public void testReduceTask ( ) throws Exception { HadoopJob gridJob = getHadoopJob ( igfsScheme ( ) + PATH_INPUT , igfsScheme ( ) + PATH_OUTPUT ) ; runTaskWithInput ( gridJob , HadoopTaskType . REDUCE , 0 , "word1" , "5" , "word2" , "10" ) ; runTaskWithInput ( gridJob , HadoopTaskType . REDUCE , 1 , "word3" , "7" , "word4" , "15" ) ; assertEquals ( "word1\t5\n" + "word2\t10\n" , readAndSortFile ( PATH_OUTPUT + "/_temporary/0/task_00000000-0000-0000-0000-000000000000_0000_r_000000/" + getOutputFileNamePrefix ( ) + "00000" ) ) ; assertEquals ( "word3\t7\n" + "word4\t15\n" , readAndSortFile ( PATH_OUTPUT + "/_temporary/0/task_00000000-0000-0000-0000-000000000000_0000_r_000001/" + getOutputFileNamePrefix ( ) + "00001" ) ) ; }
tests reduce task execution .
