本文整理了Java中alluxio.uri.ZookeeperAuthority.toString()
方法的一些代码示例,展示了ZookeeperAuthority.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZookeeperAuthority.toString()
方法的具体详情如下:
包路径:alluxio.uri.ZookeeperAuthority
类名称:ZookeeperAuthority
方法名:toString
暂无
代码示例来源:origin: Alluxio/alluxio
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ZookeeperAuthority)) {
return false;
}
ZookeeperAuthority that = (ZookeeperAuthority) o;
return toString().equals(that.toString());
}
代码示例来源:origin: Alluxio/alluxio
@Test
public void zookeeperAuthorityTest() {
ZookeeperAuthority authority = (ZookeeperAuthority) Authority.fromString("zk@host:2181");
assertEquals("zk@host:2181", authority.toString());
assertEquals("host:2181", authority.getZookeeperAddress());
authority = (ZookeeperAuthority) Authority
.fromString("zk@127.0.0.1:2181,127.0.0.2:2181,127.0.0.3:2181");
assertEquals("zk@127.0.0.1:2181,127.0.0.2:2181,127.0.0.3:2181", authority.toString());
assertEquals("127.0.0.1:2181,127.0.0.2:2181,127.0.0.3:2181", authority.getZookeeperAddress());
authority = (ZookeeperAuthority) Authority.fromString("zk@host1:2181;host2:2181;host3:2181");
assertEquals("zk@host1:2181,host2:2181,host3:2181", authority.toString());
assertEquals("host1:2181,host2:2181,host3:2181", authority.getZookeeperAddress());
authority = (ZookeeperAuthority) Authority.fromString("zk@host1:2181+host2:2181+host3:2181");
assertEquals("zk@host1:2181,host2:2181,host3:2181", authority.toString());
assertEquals("host1:2181,host2:2181,host3:2181", authority.getZookeeperAddress());
}
内容来源于网络,如有侵权,请联系作者删除!