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