本文整理了Java中com.spotify.helios.master.ZooKeeperMasterModel.rollingUpdateAwaitRunning()
方法的一些代码示例,展示了ZooKeeperMasterModel.rollingUpdateAwaitRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperMasterModel.rollingUpdateAwaitRunning()
方法的具体详情如下:
包路径:com.spotify.helios.master.ZooKeeperMasterModel
类名称:ZooKeeperMasterModel
方法名:rollingUpdateAwaitRunning
暂无
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!