Package org.apache.ivory.entity.v0.process

Examples of org.apache.ivory.entity.v0.process.Process


    parser.validate(process);
  }
 
  @Test(expectedExceptions = ValidationException.class)
  public void testDuplicateInputOutputNames() throws IvoryException {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getInputs().getInputs().get(0).setName("duplicateName");
    process.getOutputs().getOutputs().get(0).setName("duplicateName");
    parser.validate(process);
  }
View Full Code Here


    parser.validate(process);
  }
 
  @Test(expectedExceptions = IvoryException.class)
  public void testInvalidRetryAttempt() throws IvoryException {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getRetry().setAttempts(-1);
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    parser.parseAndValidate(process.toString());
  }

  @Test(expectedExceptions = IvoryException.class)
  public void testInvalidRetryDelay() throws IvoryException {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getRetry().setDelay(Frequency.fromString("hours(0)"));
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    parser.parseAndValidate(process.toString());
  }
 
  @Test(expectedExceptions = ValidationException.class)
  public void testInvalidLateInputs() throws Exception {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getLateProcess().getLateInputs().get(0).setInput("invalidInput");
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    parser.parseAndValidate(process.toString());
  }
 
  @Test(expectedExceptions = IvoryException.class)
  public void testInvalidProcessName() throws Exception {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.setName("name_with_underscore");
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    parser.parseAndValidate(process.toString());
  }
 
  @Test
  public void testOozieFutureExpression() throws Exception {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getInputs().getInputs().get(0).setStart("future(1,2)");
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    builder.setSuffixes(Arrays.asList("cluster1"));
    Assert.assertEquals(builder.getWorkflowName().toString(),
        "IVORY_FEED_REPLICATION_raw-logs_cluster1");

    Process process = new Process();
    process.setName("agg-logs");
    WorkflowNameBuilder<Process> processBuilder = new WorkflowNameBuilder<Process>(
        process);
    processBuilder.setTag(Tag.DEFAULT);
    Assert.assertEquals(processBuilder.getWorkflowName().toString(),
        "IVORY_PROCESS_DEFAULT_agg-logs");
View Full Code Here

    parser.parseAndValidate(process.toString());
  }
 
  @Test
  public void testOozieLatestExpression() throws Exception {
    Process process = parser
        .parseAndValidate((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getInputs().getInputs().get(0).setStart("latest(-1)");
    parser.parseAndValidate(process.toString());
  }
View Full Code Here

    parser.parseAndValidate(process.toString());
  }
 
  @Test(expectedExceptions=ValidationException.class)
  public void testDuplicateClusterName() throws Exception {
    Process process = parser
        .parse((ProcessEntityParserTest.class
            .getResourceAsStream(PROCESS_XML)));
    process.getClusters().getClusters().add(1, process.getClusters().getClusters().get(0));
    parser.validate(process);
  }
View Full Code Here

            // start time >= end time
            return null;

        Cluster cluster = configStore.get(EntityType.CLUSTER, processCluster.getName());
        Path bundlePath = new Path(ClusterHelper.getLocation(cluster, "staging"), EntityUtil.getStagingPath(process));
        Process processClone = (Process) process.clone();
        EntityUtil.setStartDate(processClone, clusterName, startDate);

        OozieProcessMapper mapper = new OozieProcessMapper(processClone);
        if(!mapper.map(cluster, bundlePath)){
            return null;
View Full Code Here

TOP

Related Classes of org.apache.ivory.entity.v0.process.Process

Copyright © 2018 www.massapicom. 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.