gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-24 01:59:05 31 4
gpt4 key购买 nike

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

WorkflowConfig.getStartTime介绍

[英]Get the scheduled start time of the workflow.
[中]获取工作流的计划开始时间。

代码示例

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

/**
  * Check if a workflow is ready to schedule.
  * @param workflowCfg the workflow to check
  * @return true if the workflow is ready for schedule, false if not ready
  */
 protected boolean isWorkflowReadyForSchedule(WorkflowConfig workflowCfg) {
  Date startTime = workflowCfg.getStartTime();
  // Workflow with non-scheduled config or passed start time is ready to schedule.
  return (startTime == null || startTime.getTime() <= System.currentTimeMillis());
 }
}

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

/**
 * Check if a workflow is ready to schedule.
 * @param workflowCfg the workflow to check
 * @return true if the workflow is ready for schedule, false if not ready
 */
protected boolean isWorkflowReadyForSchedule(WorkflowConfig workflowCfg) {
 Date startTime = workflowCfg.getStartTime();
 // Workflow with non-scheduled config or passed start time is ready to schedule.
 return (startTime == null || startTime.getTime() <= System.currentTimeMillis());
}

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

public void assignWorkflow(String workflow, WorkflowConfig workflowCfg,
  WorkflowContext workflowCtx) {
 // Fetch workflow configuration and context
 if (workflowCfg == null) {
  // Already logged in status update.
  return;
 }
 if (!isWorkflowReadyForSchedule(workflowCfg)) {
  LOG.info("Workflow " + workflow + " is not ready to schedule");
  // set the timer to trigger future schedule
  _rebalanceScheduler.scheduleRebalance(_manager, workflow,
    workflowCfg.getStartTime().getTime());
  return;
 }
 // Check for readiness, and stop processing if it's not ready
 boolean isReady = scheduleWorkflowIfReady(workflow, workflowCfg, workflowCtx, _taskDataCache);
 if (isReady) {
  // Schedule jobs from this workflow.
  scheduleJobs(workflow, workflowCfg, workflowCtx, _taskDataCache.getJobConfigMap(), _taskDataCache);
 } else {
  LOG.debug("Workflow " + workflow + " is not ready to be scheduled.");
 }
 _taskDataCache.updateWorkflowContext(workflow, workflowCtx);
}

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

configStartTime.setTime(wCfg.getStartTime());

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

configStartTime.setTime(wCfg.getStartTime());

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

workflowCfg.getStartTime().getTime());
return buildEmptyAssignment(workflow, currStateOutput);

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com