com.spotify.helios.master.ZooKeeperMasterModel.rollingUpdateDeploy()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(109)

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

ZooKeeperMasterModel.rollingUpdateDeploy介绍

暂无

代码示例

代码示例来源:origin: spotify/helios

private RollingUpdateOp processRollingUpdateTask(final ZooKeeperClient client,
                         final RollingUpdateOpFactory opFactory,
                         final RolloutTask task,
                         final DeploymentGroup deploymentGroup) {
 final RolloutTask.Action action = task.getAction();
 final String host = task.getTarget();
 switch (action) {
  case UNDEPLOY_OLD_JOBS:
   // add undeploy ops for jobs previously deployed by this deployment group
   return rollingUpdateUndeploy(client, opFactory, deploymentGroup, host);
  case DEPLOY_NEW_JOB:
   // add deploy ops for the new job
   return rollingUpdateDeploy(client, opFactory, deploymentGroup, host);
  case AWAIT_RUNNING:
   return rollingUpdateAwaitRunning(client, opFactory, deploymentGroup, host);
  case FORCE_UNDEPLOY_JOBS:
   return forceRollingUpdateUndeploy(client, opFactory, deploymentGroup, host);
  case AWAIT_UNDEPLOYED:
   return rollingUpdateAwaitUndeployed(client, opFactory, deploymentGroup, host);
  case MARK_UNDEPLOYED:
   return rollingUpdateMarkUndeployed(client, opFactory, deploymentGroup, host);
  default:
   throw new HeliosRuntimeException(String.format(
     "unknown rollout task type %s for deployment group %s.",
     action, deploymentGroup.getName()));
 }
}

代码示例来源:origin: at.molindo/helios-services

private RollingUpdateTaskResult getRollingUpdateTaskResult(final RolloutTask task,
                              final DeploymentGroup group) {
 final RollingUpdateTaskResult result;
 if (task == null) {
  // if there is no rollout task, then we're done by definition. this can happen
  // when (for example) there are no hosts in the deployment group
  result = RollingUpdateTaskResult.TASK_COMPLETE;
 } else {
  final String host = task.getTarget();
  final RolloutTask.Action action = task.getAction();
  switch (action) {
   case UNDEPLOY_OLD_JOBS:
    // add undeploy ops for jobs previously deployed by this deployment group
    result = rollingUpdateUndeploy(group, host);
    break;
   case DEPLOY_NEW_JOB:
    // add deploy ops for the new job
    result = rollingUpdateDeploy(group, host);
    break;
   case AWAIT_RUNNING:
    result = rollingUpdateAwaitRunning(group, host);
    break;
   default:
    throw new HeliosRuntimeException(String.format(
      "unknown rollout task type %s for deployment group %s.", action, group.getName()));
  }
 }
 return result;
}

相关文章