本文整理了Java中com.liveramp.hank.coordinator.zk.ZkDomain.<init>()
方法的一些代码示例,展示了ZkDomain.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkDomain.<init>()
方法的具体详情如下:
包路径:com.liveramp.hank.coordinator.zk.ZkDomain
类名称:ZkDomain
方法名:<init>
暂无
代码示例来源:origin: LiveRamp/hank
@Override
public Domain getDomainShallow(String domainName) {
if (domains.isLoaded()) {
return getDomain(domainName);
} else {
try {
return new ZkDomain(zk, ZkPath.append(domainsRoot, domainName));
} catch (InterruptedException e) {
return null;
} catch (KeeperException e) {
return null;
}
}
}
代码示例来源:origin: LiveRamp/hank
public static ZkDomain create(ZooKeeperPlus zk,
String domainsRoot,
String domainName,
int numParts,
String storageEngineFactoryClassName,
String storageEngineOptions,
String partitionerClassName,
int id,
List<String> requiredHostFlags) throws KeeperException, InterruptedException, IOException {
String path = ZkPath.append(domainsRoot, domainName);
DomainMetadata initialValue = new DomainMetadata(id, numParts, storageEngineFactoryClassName,
storageEngineOptions, partitionerClassName, Hosts.joinHostFlags(requiredHostFlags), 0);
return new ZkDomain(zk, path, true, initialValue);
}
代码示例来源:origin: LiveRamp/hank
return null;
} else {
return new ZkDomain(zk, ZkPath.append(basePath, relPath));
代码示例来源:origin: LiveRamp/hank
@Test
public void testLoad() throws Exception {
ZkDomain.create(getZk(), getRoot(), "domain0", 1024, ConstantStorageEngine.Factory.class.getName(), "---", Murmur64Partitioner.class.getName(), 0, Collections.<String>emptyList());
ZkDomain dc = new ZkDomain(getZk(), ZkPath.append(getRoot(), "domain0"));
assertEquals(0, dc.getId());
assertEquals("domain0", dc.getName());
assertEquals(1024, dc.getNumParts());
assertEquals(ConstantStorageEngine.Factory.class.getName(), dc.getStorageEngineFactoryClassName());
assertEquals(ConstantStorageEngine.Factory.class, dc.getStorageEngineFactoryClass());
assertTrue(dc.getStorageEngine() instanceof ConstantStorageEngine);
assertTrue(dc.getVersions().isEmpty());
assertTrue(dc.getPartitioner() instanceof Murmur64Partitioner);
}
内容来源于网络,如有侵权,请联系作者删除!