MCPcopy Create free account
hub / github.com/apache/pig / checkAndCleanup

Method checkAndCleanup

test/org/apache/pig/test/TestFinish.java:116–132  ·  view source on GitHub ↗
(ExecType execType, String expectedFileName,
            String inputFileName)

Source from the content-addressed store, hash-verified

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 {

Callers 4

testFinishInMapMRMethod · 0.95
testFinishInReduceMRMethod · 0.95
testFinishInMapLocMethod · 0.95
testFinishInReduceLocMethod · 0.95

Calls 8

toConfigurationMethod · 0.95
deleteFileMethod · 0.95
getMethod · 0.65
existsMethod · 0.65
deleteMethod · 0.65
getExecTypeMethod · 0.45
getPropertiesMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected