()
| 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 { |
nothing calls this directly
no test coverage detected