本文整理了Java中com.liveramp.hank.coordinator.zk.ZkDomain.getId()
方法的一些代码示例,展示了ZkDomain.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkDomain.getId()
方法的具体详情如下:
包路径:com.liveramp.hank.coordinator.zk.ZkDomain
类名称:ZkDomain
方法名:getId
暂无
代码示例来源:origin: LiveRamp/hank
@Override
public Domain updateDomain(String domainName,
int numParts,
String storageEngineFactoryClassName,
String storageEngineOptions,
String partitionerClassName,
List<String> requiredHostFlags) throws IOException {
ZkDomain domain = (ZkDomain)getDomain(domainName);
if (domain == null) {
throw new IOException("Could not get Domain '" + domainName + "' from Coordinator.");
} else {
try {
domain.update(domain.getId(), numParts, storageEngineFactoryClassName, storageEngineOptions,
partitionerClassName, requiredHostFlags);
return domain;
} catch (Exception e) {
throw new IOException(e);
}
}
}
代码示例来源:origin: LiveRamp/hank
@Override
public String toString() {
return "ZkDomain [domainPath=" + path + ", id=" + getId() + ", name=" + name + ", numParts=" + getNumParts()
+ ", partitioner=" + getPartitionerClassName() + ", storageEngine=" + getStorageEngine()
+ ", storageEngineFactoryClassName=" + getStorageEngineFactoryClassName() + ", storageEngineOptions="
+ getStorageEngineOptions() + "]";
}
}
代码示例来源:origin: LiveRamp/hank
@Test
public void testCreate() throws Exception {
ZkDomain dc = ZkDomain.create(getZk(), getRoot(), "domain0", 1024, ConstantStorageEngine.Factory.class.getName(), "---", Murmur64Partitioner.class.getName(), 0, Collections.<String>emptyList());
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);
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!