本文整理了Java中com.spotify.helios.master.ZooKeeperMasterModel.getDeployOperations()
方法的一些代码示例,展示了ZooKeeperMasterModel.getDeployOperations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperMasterModel.getDeployOperations()
方法的具体详情如下:
包路径:com.spotify.helios.master.ZooKeeperMasterModel
类名称:ZooKeeperMasterModel
方法名:getDeployOperations
暂无
代码示例来源:origin: spotify/helios
private RollingUpdateOp rollingUpdateDeploy(final ZooKeeperClient client,
final RollingUpdateOpFactory opFactory,
final DeploymentGroup deploymentGroup,
final String host) {
final Deployment deployment = Deployment.of(deploymentGroup.getJobId(), Goal.START,
Deployment.EMTPY_DEPLOYER_USER, this.name,
deploymentGroup.getName());
try {
final String token = MoreObjects.firstNonNull(
deploymentGroup.getRolloutOptions().getToken(), Job.EMPTY_TOKEN);
return opFactory.nextTask(getDeployOperations(client, host, deployment, token));
} catch (JobDoesNotExistException e) {
return opFactory.error(e, host, RollingUpdateError.JOB_NOT_FOUND);
} catch (TokenVerificationException e) {
return opFactory.error(e, host, RollingUpdateError.TOKEN_VERIFICATION_ERROR);
} catch (HostNotFoundException e) {
return opFactory.error(e, host, RollingUpdateError.HOST_NOT_FOUND);
} catch (JobPortAllocationConflictException e) {
return opFactory.error(e, host, RollingUpdateError.PORT_CONFLICT);
} catch (JobAlreadyDeployedException e) {
// Nothing to do
return opFactory.nextTask();
}
}
代码示例来源:origin: at.molindo/helios-services
private RollingUpdateTaskResult rollingUpdateDeploy(final DeploymentGroup deploymentGroup,
final String host) {
final Deployment deployment = Deployment.of(deploymentGroup.getJobId(), Goal.START,
Deployment.EMTPY_DEPLOYER_USER, this.name,
deploymentGroup.getName());
final ZooKeeperClient client = provider.get("rollingUpdateDeploy");
try {
return RollingUpdateTaskResult.of(getDeployOperations(client, host, deployment,
Job.EMPTY_TOKEN));
} catch (JobDoesNotExistException | TokenVerificationException | HostNotFoundException e) {
return RollingUpdateTaskResult.error(e);
} catch (JobAlreadyDeployedException e) {
return RollingUpdateTaskResult.TASK_COMPLETE;
}
}
内容来源于网络,如有侵权,请联系作者删除!