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

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


    Assert.assertNull(p);
  }

  @Test
  public void testRemove() throws Exception {
    Process process = new Process();
    process.setName("remove");
    store.publish(EntityType.PROCESS, process);
    Process p = store.get(EntityType.PROCESS, "remove");
    Assert.assertEquals(p, process);
    store.remove(EntityType.PROCESS, "remove");
    p = store.get(EntityType.PROCESS, "remove");
    Assert.assertNull(p);
  }
View Full Code Here


                  itr.remove();
          }
          return (T) feed;           
         
      case PROCESS:
          Process process = (Process) entity.clone();
          Iterator<org.apache.ivory.entity.v0.process.Cluster> procItr = process.getClusters().getClusters().iterator();
          while(procItr.hasNext()) {
              org.apache.ivory.entity.v0.process.Cluster cluster = procItr.next();
              if(!cluster.getName().equals(clusterName))
                  procItr.remove();
          }
View Full Code Here

      for(Cluster cluster:feed.getClusters().getClusters())
        clusters.add(cluster.getName());
      break;
     
    case PROCESS:
      Process process = (Process) entity;
      for(org.apache.ivory.entity.v0.process.Cluster cluster:process.getClusters().getClusters())
        clusters.add(cluster.getName());
      break;
   
    return clusters;
  }
View Full Code Here

          "feed.retry.frequency", "minutes(5)")));
      retry.setPolicy(PolicyType.fromValue(RuntimeProperties.get()
          .getProperty("feed.retry.policy", "exp-backoff")));
      return retry;
    case PROCESS:
      Process process = (Process) entity;
      return process.getRetry();
    default:
      throw new IvoryException("Cannot create Retry for entity:"+entity.getName());
    }
  }
View Full Code Here

      //TODO - Assuming the late workflow is not used
      lateInput.setWorkflowPath("ignore.xml");
      lateProcess.getLateInputs().add(lateInput);
      return lateProcess;
    case PROCESS:
      Process process = (Process) entity;
      return process.getLateProcess();
    default:
      throw new IvoryException("Cannot create Late Process for entity:"+entity.getName());
    }
  }
View Full Code Here

      endTime = EntityUtil.parseDateUTC(nominalTime);
      long feedCutOffPeriod = evaluator.evaluate(lateCutOff, Long.class);
      endTime = addTime(endTime, (int) feedCutOffPeriod);
      return endTime;
    } else if (entity.getEntityType() == EntityType.PROCESS) {
      Process process = (Process) entity;
      for (LateInput lp : process.getLateProcess().getLateInputs()) {
        Feed feed = null;
        String endInstanceTime = "";
        for (Input input : process.getInputs().getInputs()) {
          if (input.getName().equals(lp.getInput())) {
            endInstanceTime = input.getEnd();
            feed = store.get(EntityType.FEED, input.getFeed());
            break;
          }
View Full Code Here

       
        ConfigurationStore store = ConfigurationStore.get();
        Cluster cluster = store.get(EntityType.CLUSTER, "corp");
        ClusterHelper.getInterface(cluster, Interfacetype.WRITE).setEndpoint(hdfsUrl);

        Process process = store.get(EntityType.PROCESS, "clicksummary");
        Path wfpath = new Path(process.getWorkflow().getPath());
        assert new Path(hdfsUrl).getFileSystem(new Configuration()).mkdirs(wfpath);
    }
View Full Code Here

        }
    }
   
    @Test
    public void testBundle() throws Exception {
        Process process = ConfigurationStore.get().get(EntityType.PROCESS, "clicksummary");
        Cluster cluster = ConfigurationStore.get().get(EntityType.CLUSTER, "corp");
        OozieProcessMapper mapper = new OozieProcessMapper(process);
        Path bundlePath = new Path("/", EntityUtil.getStagingPath(process));
        mapper.map(cluster, bundlePath);
       
View Full Code Here

        testParentWorkflow(process,parentWorkflow);
    }

    @Test
    public void testBundle1() throws Exception {
        Process process = ConfigurationStore.get().get(EntityType.PROCESS, "clicksummary");
        Cluster cluster = ConfigurationStore.get().get(EntityType.CLUSTER, "corp");
        process.setFrequency(Frequency.fromString("minutes(1)"));
        process.setTimeout(Frequency.fromString("minutes(15)"));
        OozieProcessMapper mapper = new OozieProcessMapper(process);
        Path bundlePath = new Path("/", EntityUtil.getStagingPath(process));
        mapper.map(cluster, bundlePath);

        FileSystem fs = new Path(hdfsUrl).getFileSystem(new Configuration());
View Full Code Here

                feed.setName(name);
                store.publish(type, feed);
                break;
               
            case PROCESS:
                Process process = (Process) unmarshaller.unmarshal(this.getClass().getResource(PROCESS_XML));
                process.setName(name);
                store.publish(type, process);
                break;
        }
    }
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.