6667686970717273747576
// Run examples TestMiniMRWithDFS.runPI(mr, mr.createJobConf(mrConf)); TestMiniMRWithDFS.runWordCount(mr, mr.createJobConf(mrConf)); } finally { if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown(); } } } private static final String DUMMY_ACL = "nouser nogroup";
919293949596979899100101
runProgram(mr, dfs, wordCountPart, inputPath, outputPath, 3, 2, fixedPartitionOutput, null); runNonPipedProgram(mr, dfs, wordCountNoPipes, null); mr.waitUntilIdle(); } finally { mr.shutdown(); dfs.shutdown(); } }
180181182183184185186187188189190
assertTrue(fileList.length == numMappers); } finally { if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown(); } } } }
143144145146147148149150151152153
} assertEquals(cacheString + "\t", line); assertEquals(cacheString2 + "\t", line2); } finally{ if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown();} } } public static void main(String[]args) throws Exception {
127128129130131132133134135136137
System.out.println(line); } assertEquals(cacheString + "\t", line); } finally{ if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown();} } } public static void main(String[]args) throws Exception
8990919293949596979899
mr = new MiniMRCluster(2, "file:///", 3); Configuration conf = mr.createJobConf(); runWordCount(conf); runMultiFileWordCount(conf); } finally { if (mr != null) { mr.shutdown(); } } } public static class TrackingTextInputFormat extends TextInputFormat {
123124125126127128129130131132133
System.out.println(line); } assertEquals(cacheString + "\t", line); } finally{ if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown();} } } catch(Exception e) { failTrace(e); }
8586878889909192939495
try { mr = new MiniMRCluster(2, "file:///", 3); Configuration conf = mr.createJobConf(); runWordCount(conf); } finally { if (mr != null) { mr.shutdown(); } } } public static class TrackingTextInputFormat extends TextInputFormat {
134135136137138139140141142143144
} assertEquals(cacheString + "\t", line); assertEquals(cacheString2 + "\t", line2); } finally{ if (dfs != null) { dfs.shutdown(); } if (mr != null) { mr.shutdown();} } } catch(Exception e) { failTrace(e); }