org.apache.helix.task.WorkflowContext.setName()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.apache.helix.task.WorkflowContext.setName()方法的一些代码示例,展示了WorkflowContext.setName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowContext.setName()方法的具体详情如下:
包路径:org.apache.helix.task.WorkflowContext
类名称:WorkflowContext
方法名:setName

WorkflowContext.setName介绍

暂无

代码示例

代码示例来源:origin: apache/helix

public WorkflowContext getOrInitializeWorkflowContext(
  String workflowName, TaskDataCache cache) {
 WorkflowContext workflowCtx = cache.getWorkflowContext(workflowName);
 if (workflowCtx == null) {
  workflowCtx = new WorkflowContext(new ZNRecord(TaskUtil.WORKFLOW_CONTEXT_KW));
  workflowCtx.setStartTime(System.currentTimeMillis());
  workflowCtx.setName(workflowName);
  LOG.debug("Workflow context is created for " + workflowName);
 }
 return workflowCtx;
}

代码示例来源:origin: org.apache.helix/helix-core

private WorkflowContext getOrInitializeWorkflowContext(ClusterDataCache clusterData,
  String workflowName) {
 WorkflowContext workflowCtx = clusterData.getWorkflowContext(workflowName);
 if (workflowCtx == null) {
  WorkflowConfig config = clusterData.getWorkflowConfig(workflowName);
  workflowCtx = new WorkflowContext(new ZNRecord(TaskUtil.WORKFLOW_CONTEXT_KW));
  workflowCtx.setStartTime(System.currentTimeMillis());
  workflowCtx.setName(workflowName);
  LOG.debug("Workflow context is created for " + workflowName);
 }
 return workflowCtx;
}

代码示例来源:origin: apache/helix

public static WorkflowContext buildWorkflowContext(String workflowResource,
  TaskState workflowState, Long startTime, TaskState... jobStates) {
 WorkflowContext workflowContext =
   new WorkflowContext(new ZNRecord(TaskUtil.WORKFLOW_CONTEXT_KW));
 workflowContext.setName(workflowResource);
 workflowContext.setStartTime(startTime == null ? System.currentTimeMillis() : startTime);
 int jobId = 0;
 for (TaskState jobstate : jobStates) {
  workflowContext
    .setJobState(TaskUtil.getNamespacedJobName(workflowResource, JOB_KW) + jobId++, jobstate);
 }
 workflowContext.setWorkflowState(workflowState);
 return workflowContext;
}

代码示例来源:origin: apache/helix

workflowCtx = new WorkflowContext(new ZNRecord(TaskUtil.WORKFLOW_CONTEXT_KW));
workflowCtx.setStartTime(System.currentTimeMillis());
workflowCtx.setName(workflowResource);
LOG.info("Workflow context for " + resourceName + " created!");

代码示例来源:origin: org.apache.helix/helix-core

workflowCtx = new WorkflowContext(new ZNRecord(TaskUtil.WORKFLOW_CONTEXT_KW));
workflowCtx.setStartTime(System.currentTimeMillis());
workflowCtx.setName(workflowResource);
LOG.info("Workflow context for " + resourceName + " created!");

代码示例来源:origin: apache/helix

wfCtx.setJobState(_testJobPrefix + "1", TaskState.COMPLETED);
wfCtx.setWorkflowState(TaskState.IN_PROGRESS);
wfCtx.setName(_testWorkflow);
wfCtx.setStartTime(System.currentTimeMillis());

相关文章