Package com.twitter.ambrose.model

Examples of com.twitter.ambrose.model.WorkflowId


    return Status.valueOf(status.name());
  }

  /** Generates a new instance from an hRaven {@link Flow}. */
  private static WorkflowSummary toWorkflowSummary(Flow flow) {
    WorkflowId id = toWorkflowId(flow);
    return new WorkflowSummary(id.toId(), flow.getUserName(), flow.getFlowName(),
        Status.valueOf(flow.getQueueKey().getStatus().name()), flow.getProgress(),
        id.getTimestamp());
  }
View Full Code Here


        Status.valueOf(flow.getQueueKey().getStatus().name()), flow.getProgress(),
        id.getTimestamp());
  }

  private static WorkflowId toWorkflowId(Flow flow) {
    return new WorkflowId(flow.getCluster(), flow.getUserName(), flow.getFlowKey().getAppId(),
        flow.getRunId(), flow.getQueueKey().getTimestamp(), flow.getQueueKey().getFlowId());
  }
View Full Code Here

  public String getWorkflowId() {
    if(!initialized) {
      return null;
    }
    // initialized is true only if flowKey and flowQueueKey are initialized
    WorkflowId workflowId = new WorkflowId(cluster, username,
        appId, flowKey.getRunId(), flowQueueKey.getTimestamp(),
        flowQueueKey.getFlowId());
    return workflowId.toId();
  }
View Full Code Here

   * @throws IOException
   */
  @SuppressWarnings("rawtypes")
  @Override
  public Map<String, DAGNode> getDagNodeNameMap(String workflowId) throws IOException {
    WorkflowId id = WorkflowId.parseString(workflowId);
    Flow flow = flowQueueService.getFlowFromQueue(
        id.getCluster(), id.getTimestamp(), id.getFlowId());

    if (flow == null) {
      return null;
    }

View Full Code Here

  @SuppressWarnings("rawtypes")
  @Override
  public List<Event> getEventsSinceId(String workflowId, int eventId, int maxEvents)
      throws IOException {
    Preconditions.checkArgument(maxEvents > 0);
    WorkflowId id = WorkflowId.parseString(workflowId);
    FlowEventKey flowEventKey = new FlowEventKey(toFlowKey(id), eventId);
    List<FlowEvent> flowEventList = flowEventService.getFlowEventsSince(flowEventKey);

    // TODO push this limit into the FlowEventService
    int numElems = 0;
View Full Code Here

TOP

Related Classes of com.twitter.ambrose.model.WorkflowId

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.