| 555 | // Tests Single input case for both blocking and non-blocking |
| 556 | // with both map and reduce phases |
| 557 | @Test |
| 558 | public void testSim1() throws Exception { |
| 559 | PhysicalPlan php = new PhysicalPlan(); |
| 560 | POLoad ld = GenPhyOp.topLoadOp(); |
| 561 | php.add(ld); |
| 562 | PhysicalPlan grpChain1 = GenPhyOp.grpChain(); |
| 563 | php.merge(grpChain1); |
| 564 | |
| 565 | php.connect(ld, grpChain1.getRoots().get(0)); |
| 566 | |
| 567 | PhysicalOperator leaf = php.getLeaves().get(0); |
| 568 | |
| 569 | PhysicalPlan grpChain2 = GenPhyOp.grpChain(); |
| 570 | php.merge(grpChain2); |
| 571 | |
| 572 | php.connect(leaf, grpChain2.getRoots().get(0)); |
| 573 | |
| 574 | leaf = php.getLeaves().get(0); |
| 575 | POFilter fl = GenPhyOp.topFilterOp(); |
| 576 | php.add(fl); |
| 577 | |
| 578 | php.connect(leaf, fl); |
| 579 | |
| 580 | POStore st = GenPhyOp.topStoreOp(); |
| 581 | php.add(st); |
| 582 | |
| 583 | php.connect(fl, st); |
| 584 | run(php, "test/org/apache/pig/test/data/GoldenFiles/MRC1.gld"); |
| 585 | } |
| 586 | |
| 587 | @Test |
| 588 | public void testSim2() throws Exception { |