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

Method testBloomJoin

test/org/apache/pig/test/TestEmptyInputDir.java:252–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 10

runMethod · 0.95
isSuccessfulMethod · 0.95
getNumberRecordsMethod · 0.95
assertEmptyOutputFileMethod · 0.95
deleteFileMethod · 0.95
closeMethod · 0.65
nameMethod · 0.65
deleteMethod · 0.65
getExecTypeMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected