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