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

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

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

ZooKeeperMasterModel.getHostStatus介绍

[英]Returns the current status of the host named by host.
[中]返回按主机命名的主机的当前状态。

代码示例

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

@Test
public void testMaster() throws Exception {
 final JobId jobId = createAndAwaitJobRunning();
 // shut down the agent so it cannot remove the tombstone we make
 agent.stopAsync().awaitTerminated();
 // make sure things look correct before
 assertFalse(zkMasterModel.getJobs().isEmpty());
 assertEquals(START, zkMasterModel.getDeployment(TEST_HOST, jobId).getGoal());
 // undeploy job
 client.undeploy(jobId, TEST_HOST).get();
 // These used to be filtered away
 assertNull(zkMasterModel.getDeployment(TEST_HOST, jobId));
 assertTrue(zkMasterModel.getHostStatus(TEST_HOST).getJobs().isEmpty());
}

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

final HostStatus hostStatus = getHostStatus(host);
final List<JobId> jobs = hostStatus != null
             ? ImmutableList.copyOf(hostStatus.getJobs().keySet())

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

hostsAndStatuses.put(host, getHostStatus(host));

相关文章