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

Method testFRJoin

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

Source from the content-addressed store, hash-verified

156 }
157
158 @Test
159 public void testFRJoin() throws Exception {
160 PrintWriter w = new PrintWriter(new FileWriter(PIG_FILE));
161 w.println("A = load '" + INPUT_FILE + "';");
162 w.println("B = load '" + EMPTY_DIR + "';");
163 w.println("C = join A by $0, B by $0 using 'repl';");
164 w.println("store C into '" + OUTPUT_FILE + "';");
165 w.close();
166
167 try {
168 String[] args = { "-x", cluster.getExecType().name(), PIG_FILE, };
169 PigStats stats = PigRunner.run(args, null);
170
171 assertTrue(stats.isSuccessful());
172
173 // This assert fails on 205 due to MAPREDUCE-3606
174 if (Util.isMapredExecType(cluster.getExecType())
175 && !Util.isHadoop205() && !Util.isHadoop1_x()) {
176 MRJobStats js = (MRJobStats) stats.getJobGraph().getSources().get(0);
177 assertEquals(0, js.getNumberMaps());
178 }
179
180 assertEmptyOutputFile();
181 } finally {
182 new File(PIG_FILE).delete();
183 Util.deleteFile(cluster, OUTPUT_FILE);
184 }
185 }
186
187 @Test
188 public void testRegularJoin() throws Exception {

Callers

nothing calls this directly

Calls 15

runMethod · 0.95
isSuccessfulMethod · 0.95
isMapredExecTypeMethod · 0.95
isHadoop205Method · 0.95
isHadoop1_xMethod · 0.95
getJobGraphMethod · 0.95
getNumberMapsMethod · 0.95
assertEmptyOutputFileMethod · 0.95
deleteFileMethod · 0.95
closeMethod · 0.65
nameMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected