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

Method testFinishInReduceMR

test/org/apache/pig/test/TestFinish.java:153–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151 }
152
153 @Test
154 public void testFinishInReduceMR() throws Exception {
155 String inputFileName = setUp(cluster.getExecType());
156 // this file will be created on the cluster if finish() is called
157 String expectedFileName = "testFinishInReduceMR-finish.txt";
158 pigServer.registerQuery("define MYUDF " + MyEvalFunction.class.getName() + "('MAPREDUCE','"
159 + expectedFileName + "');");
160 pigServer.registerQuery("a = load '" + Util.encodeEscape(inputFileName) + "' using "
161 + PigStorage.class.getName() + "(':');");
162 pigServer.registerQuery("a1 = group a by $1;");
163 pigServer.registerQuery("b = foreach a1 generate MYUDF" + "(*);");
164 Iterator<Tuple> iter = pigServer.openIterator("b");
165 while (iter.hasNext()) {
166 iter.next();
167 }
168
169 checkAndCleanup(cluster.getExecType(), expectedFileName, inputFileName);
170 }
171
172 @Test
173 public void testFinishInMapLoc() throws Exception {

Callers

nothing calls this directly

Calls 9

setUpMethod · 0.95
encodeEscapeMethod · 0.95
checkAndCleanupMethod · 0.95
openIteratorMethod · 0.80
getExecTypeMethod · 0.45
registerQueryMethod · 0.45
getNameMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected