예제 #1
0
 private PhysicalPlan create() {
   Application app = new Application(this.getClass().getSimpleName());
   app.setConfs(LocalTaskCommons.createLocalConfs());
   app.setOperators(createOperators());
   app.setSchemas(createSchemas());
   PhysicalPlan plan = new PhysicalPlan();
   plan.setApploication(app);
   return plan;
 }
  /** 写入测试 */
  @Test
  public void writerTest() throws Exception {
    String serOutFileName = "threeOperator.out.xml";
    String serResultFileName = "threeOperator.res.xml";
    PhysicalPlan plan = create();

    LocalTaskCommons.write(BASICPATH, serResultFileName, create().getApploication());
    boolean compareResult = LocalTaskCommons.compare(BASICPATH, serResultFileName, serOutFileName);
    assertTrue(compareResult);

    LocalTaskCommons.localSubmit(plan.getApploication());
  }