Package com.twitter.hraven

Examples of com.twitter.hraven.Flow


  private void updateFlowQueue(FlowQueueKey key) throws IOException {
    updateFlowQueue(key, null);
  }

  private void updateFlowQueue(FlowQueueKey key, Integer progress) throws IOException {
    Flow flow = new Flow(flowKey);
    if (progress != null) {
      flow.setProgress(progress);
    }
    flow.setQueueKey(key);
    flow.setFlowName(appId);
    flow.setUserName(username);
    flow.setJobGraphJSON(JSONUtil.toJson(dagNodeNameMap));
    hRavenPool.submit(new HRavenQueueRunnable(flowQueueService, flowQueueKey, flow));
  }
View Full Code Here


   */
  @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;
    }

    // TODO This may not work nicely with multiple type of jobs
    // See: https://github.com/twitter/ambrose/pull/131
    Map<String, DAGNode> dagMap = JSONUtil.toObject(
        flow.getJobGraphJSON(), new TypeReference<Map<String, DAGNode>>() {
        });

    return dagMap;
  }
View Full Code Here

TOP

Related Classes of com.twitter.hraven.Flow

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.