()
| 250 | } |
| 251 | |
| 252 | @Test |
| 253 | public void testBloomJoin() throws Exception { |
| 254 | PrintWriter w = new PrintWriter(new FileWriter(PIG_FILE)); |
| 255 | w.println("A = load '" + INPUT_FILE + "' as (x:int);"); |
| 256 | w.println("B = load '" + EMPTY_DIR + "' as (x:int);"); |
| 257 | w.println("C = join B by $0, A by $0 using 'bloom';"); |
| 258 | w.println("D = join A by $0, B by $0 using 'bloom';"); |
| 259 | w.println("store C into '" + OUTPUT_FILE + "';"); |
| 260 | w.println("store D into 'output1';"); |
| 261 | w.close(); |
| 262 | |
| 263 | try { |
| 264 | String[] args = { "-x", cluster.getExecType().name(), PIG_FILE, }; |
| 265 | PigStats stats = PigRunner.run(args, null); |
| 266 | |
| 267 | assertTrue(stats.isSuccessful()); |
| 268 | assertEquals(0, stats.getNumberRecords(OUTPUT_FILE)); |
| 269 | assertEquals(0, stats.getNumberRecords("output1")); |
| 270 | assertEmptyOutputFile(); |
| 271 | } finally { |
| 272 | new File(PIG_FILE).delete(); |
| 273 | Util.deleteFile(cluster, OUTPUT_FILE); |
| 274 | Util.deleteFile(cluster, "output1"); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | @Test |
| 279 | public void testBloomJoinOuter() throws Exception { |
nothing calls this directly
no test coverage detected