259260261262263264265266267268269
visitor.visit(); org.apache.pig.experimental.logical.relational.LogicalPlan newPlan = visitor.getNewLogicalPlan(); // set uids UidStamper stamper = new UidStamper(newPlan); stamper.visit(); // run optimizer org.apache.pig.experimental.logical.optimizer.LogicalPlanOptimizer optimizer = new org.apache.pig.experimental.logical.optimizer.LogicalPlanOptimizer(newPlan, 100); optimizer.optimize();
9293949596979899100101102
visitor.visit(); org.apache.pig.experimental.logical.relational.LogicalPlan newPlan = visitor.getNewLogicalPlan(); try { UidStamper stamper = new UidStamper(newPlan); stamper.visit(); return newPlan; }catch(Exception e) { throw new VisitorException(e); }
242243244245246247248249250251252
expected.connect(load, foreach); expected.connect(foreach, s); try { UidStamper stamper = new UidStamper(expected); stamper.visit(); }catch(Exception e) { throw new VisitorException(e); } assertTrue(expected.isEqual(newPlan));
380381382383384385386387388389390
expected.connect(load, foreach2); expected.connect(foreach2, s); try { UidStamper stamper = new UidStamper(expected); stamper.visit(); }catch(Exception e) { throw new VisitorException(e); } assertTrue(expected.isEqual(newPlan));
752753754755756757758759760761762
131132133134135136137138139140141
plan.connect(filter,stor); try { // Stamp everything with a Uid UidStamper stamper = new UidStamper(plan); stamper.visit(); }catch(Exception e) { assertTrue("Failed to set a valid uid", false ); } // run filter rule
292293294295296297298299300301302
plan.connect(filter,stor); try { // Stamp everything with a Uid UidStamper stamper = new UidStamper(plan); stamper.visit(); }catch(Exception e) { assertTrue("Failed to set a valid uid", false ); }
464465466467468469470471472473474
637638639640641642643644645646647
794795796797798799800801802803804