(ExecType execType, String expectedFileName,
String inputFileName)
| 114 | } |
| 115 | |
| 116 | private void checkAndCleanup(ExecType execType, String expectedFileName, |
| 117 | String inputFileName) throws IOException { |
| 118 | if (execType == cluster.getExecType()) { |
| 119 | FileSystem fs = FileSystem.get(ConfigurationUtil.toConfiguration( |
| 120 | cluster.getProperties())); |
| 121 | assertTrue(fs.exists(new Path(expectedFileName))); |
| 122 | Util.deleteFile(cluster, inputFileName); |
| 123 | Util.deleteFile(cluster, expectedFileName); |
| 124 | } else if (execType == ExecType.LOCAL) { |
| 125 | File f = new File(expectedFileName); |
| 126 | assertTrue(f.exists()); |
| 127 | f.delete(); |
| 128 | } else { |
| 129 | throw new IllegalArgumentException("invalid excetype " + execType. |
| 130 | toString()); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | @Test |
| 135 | public void testFinishInMapMR() throws Exception { |
no test coverage detected