Ejemplo n.º 1
0
  @Test(expected = MRCompilerException.class)
  public void testMRCompilerErr() throws Exception {
    String query = "a = load 'input';" + "b = filter a by $0 > 5;" + "store b into 'output';";

    PhysicalPlan pp = Util.buildPp(pigServer, query);
    pp.remove(pp.getRoots().get(0));
    try {
      Util.buildMRPlan(new PhysicalPlan(), pc);
    } catch (MRCompilerException mrce) {
      assertEquals(2053, mrce.getErrorCode());
      throw mrce;
    }
  }
Ejemplo n.º 2
0
  @Test
  public void testMRCompilerErr() throws Exception {
    planTester.buildPlan("a = load 'input';");
    LogicalPlan lp = planTester.buildPlan("b = filter a by $0 > 5;");

    PhysicalPlan pp = Util.buildPhysicalPlan(lp, pc);
    pp.remove(pp.getRoots().get(0));
    try {
      Util.buildMRPlan(new PhysicalPlan(), pc);
      fail("Expected failure.");
    } catch (MRCompilerException mrce) {
      assertTrue(mrce.getErrorCode() == 2053);
    }
  }
Ejemplo n.º 3
0
  @Test(expected = MRCompilerException.class)
  public void testMRCompilerErr1() throws Exception {
    PhysicalPlan pp = new PhysicalPlan();
    PhysicalPlan ldFil1 = GenPhyOp.loadedFilter();
    pp.merge(ldFil1);

    POSplit op = GenPhyOp.topSplitOp();
    pp.addAsLeaf(op);

    try {
      Util.buildMRPlan(pp, pc);
    } catch (MRCompilerException mrce) {
      assertEquals(2025, mrce.getErrorCode());
      throw mrce;
    }
  }
Ejemplo n.º 4
0
  @Test
  public void testMRCompilerErr1() throws Exception {
    PhysicalPlan pp = new PhysicalPlan();
    PhysicalPlan ldFil1 = GenPhyOp.loadedFilter();
    pp.merge(ldFil1);

    POSplit op = GenPhyOp.topSplitOp();
    pp.addAsLeaf(op);

    try {
      Util.buildMRPlan(pp, pc);
      fail("Expected failure.");
    } catch (MRCompilerException mrce) {
      assertTrue(mrce.getErrorCode() == 2025);
    }
  }