Package org.apache.drill.exec.physical

Examples of org.apache.drill.exec.physical.PhysicalPlan.unparse()


    DrillConfig c = DrillConfig.create();
    PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    ObjectReader r = c.getMapper().reader(PhysicalPlan.class);
    ObjectWriter writer = c.getMapper().writer();
    PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/physical_test1.json"), Charsets.UTF_8));
    System.out.println(plan.unparse(writer));
  }
}
View Full Code Here


      pops.add(f);
      pops.add(screen);

      if(reversed) pops = Lists.reverse(pops);
      PhysicalPlan plan1 = new PhysicalPlan(PlanProperties.builder().build(), pops);
      String json = plan1.unparse(c.getMapper().writer());
      System.out.println(json);

      PhysicalPlan plan2 = reader.readPhysicalPlan(json);
      System.out.println("++++++++");
      System.out.println(plan2.unparse(c.getMapper().writer()));
View Full Code Here

      String json = plan1.unparse(c.getMapper().writer());
      System.out.println(json);

      PhysicalPlan plan2 = reader.readPhysicalPlan(json);
      System.out.println("++++++++");
      System.out.println(plan2.unparse(c.getMapper().writer()));

      PhysicalOperator root = plan2.getSortedOperators(false).iterator().next();
      assertEquals(0, root.getOperatorId());
      PhysicalOperator o1 = root.iterator().next();
      assertEquals(1, o1.getOperatorId());
View Full Code Here

    DrillConfig c = DrillConfig.create();
    PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    ObjectReader r = c.getMapper().reader(PhysicalPlan.class);
    ObjectWriter writer = c.getMapper().writer();
    PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/physical_test1.json"), Charsets.UTF_8));
    System.out.println(plan.unparse(writer));
  }
}
View Full Code Here

      if (reversed) {
        pops = Lists.reverse(pops);
      }
      PhysicalPlan plan1 = new PhysicalPlan(PlanProperties.builder().build(), pops);
      String json = plan1.unparse(c.getMapper().writer());
      System.out.println(json);

      PhysicalPlan plan2 = reader.readPhysicalPlan(json);
      System.out.println("++++++++");
      System.out.println(plan2.unparse(c.getMapper().writer()));
View Full Code Here

      String json = plan1.unparse(c.getMapper().writer());
      System.out.println(json);

      PhysicalPlan plan2 = reader.readPhysicalPlan(json);
      System.out.println("++++++++");
      System.out.println(plan2.unparse(c.getMapper().writer()));

      PhysicalOperator root = plan2.getSortedOperators(false).iterator().next();
      assertEquals(0, root.getOperatorId());
      PhysicalOperator o1 = root.iterator().next();
      assertEquals(1, o1.getOperatorId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.