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

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

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

WorkflowContext.setWorkflowState介绍

暂无

代码示例

代码示例来源:origin: com.linkedin.gobblin/gobblin-cluster

workflowCtx.setWorkflowState(TaskState.STOPPED);
workflowCtx.setWorkflowState(TaskState.IN_PROGRESS);

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

workflowCtx.setWorkflowState(TaskState.STOPPED);
workflowCtx.setWorkflowState(TaskState.IN_PROGRESS);
    workflowCtx.setJobState(jobResource, TaskState.FAILED);
    if (workflowConfig.isTerminable()) {
     workflowCtx.setWorkflowState(TaskState.FAILED);
     workflowCtx.setFinishTime(finishTime);
jobCtx.setFinishTime(currentTime);
if (isWorkflowComplete(workflowCtx, workflowConfig)) {
 workflowCtx.setWorkflowState(TaskState.COMPLETED);
 workflowCtx.setFinishTime(currentTime);

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

workflowCtx.setWorkflowState(TaskState.STOPPED);
workflowCtx.setWorkflowState(TaskState.IN_PROGRESS);
    workflowCtx.setJobState(jobResource, TaskState.FAILED);
    if (workflowConfig.isTerminable()) {
     workflowCtx.setWorkflowState(TaskState.FAILED);
     workflowCtx.setFinishTime(finishTime);
jobCtx.setFinishTime(currentTime);
if (isWorkflowComplete(workflowCtx, workflowConfig)) {
 workflowCtx.setWorkflowState(TaskState.COMPLETED);
 workflowCtx.setFinishTime(currentTime);

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

failedJobs++;
 if (!cfg.isJobQueue() && failedJobs > cfg.getFailureThreshold()) {
  ctx.setWorkflowState(TaskState.FAILED);
  LOG.info("Workflow {} reached the failure threshold, so setting its state to FAILED.",
    cfg.getWorkflowId());
ctx.setWorkflowState(TaskState.COMPLETED);
return true;

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

failedJobs++;
 if (!cfg.isJobQueue() && failedJobs > cfg.getFailureThreshold()) {
  ctx.setWorkflowState(TaskState.FAILED);
  LOG.info("Workflow {} reached the failure threshold, so setting its state to FAILED.", cfg.getWorkflowId());
  for (String jobToFail : cfg.getJobDag().getAllNodes()) {
ctx.setWorkflowState(TaskState.COMPLETED);
return true;

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

workflowCtx.setWorkflowState(TaskState.TIMED_OUT);
 _taskDataCache.updateWorkflowContext(workflow, workflowCtx);
LOG.info("Workflow " + workflow + "is marked as stopped.");
if (isWorkflowStopped(workflowCtx, workflowCfg)) {
 workflowCtx.setWorkflowState(TaskState.STOPPED);
 _taskDataCache.updateWorkflowContext(workflow, 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.setWorkflowState(TaskState.STOPPED);
} else {
 workflowCtx.setWorkflowState(TaskState.STOPPING);
workflowCtx.setWorkflowState(TaskState.IN_PROGRESS);

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

workflowCtx.setWorkflowState(TaskState.TIMED_OUT);
 clusterData.updateWorkflowContext(workflow, workflowCtx, _manager.getHelixDataAccessor());
LOG.info("Workflow " + workflow + "is marked as stopped.");
if (isWorkflowStopped(workflowCtx, workflowCfg)) {
 workflowCtx.setWorkflowState(TaskState.STOPPED);
 clusterData.updateWorkflowContext(workflow, workflowCtx, _manager.getHelixDataAccessor());

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

workflowCtx.setWorkflowState(TaskState.STOPPED);
} else {
 workflowCtx.setWorkflowState(TaskState.STOPPING);
workflowCtx.setWorkflowState(TaskState.IN_PROGRESS);

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

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

相关文章