()
| 170 | } |
| 171 | |
| 172 | @Test |
| 173 | public void testFinishInMapLoc() throws Exception { |
| 174 | String inputFileName = setUp(ExecType.LOCAL); |
| 175 | // this file will be created on the cluster if finish() is called |
| 176 | String expectedFileName = "testFinishInMapLoc-finish.txt"; |
| 177 | pigServer.registerQuery("define MYUDF " + MyEvalFunction.class.getName() + "('LOCAL','" |
| 178 | + expectedFileName + "');"); |
| 179 | pigServer.registerQuery("a = load '" + Util.encodeEscape(inputFileName) + "' using " |
| 180 | + PigStorage.class.getName() + "(':');"); |
| 181 | pigServer.registerQuery("b = foreach a generate MYUDF" + "(*);"); |
| 182 | pigServer.openIterator("b"); |
| 183 | checkAndCleanup(ExecType.LOCAL, expectedFileName, inputFileName); |
| 184 | } |
| 185 | |
| 186 | @Test |
| 187 | public void testFinishInReduceLoc() throws Exception { |
nothing calls this directly
no test coverage detected