本文整理了Java中org.apache.helix.manager.zk.ZkCacheBaseDataAccessor.get()
方法的一些代码示例,展示了ZkCacheBaseDataAccessor.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkCacheBaseDataAccessor.get()
方法的具体详情如下:
包路径:org.apache.helix.manager.zk.ZkCacheBaseDataAccessor
类名称:ZkCacheBaseDataAccessor
方法名:get
暂无
代码示例来源:origin: apache/incubator-pinot
/**
* Check if an Instance exists in the Helix cluster.
*
* @param instanceName: Name of instance to check.
* @return True if instance exists in the Helix cluster, False otherwise.
*/
public boolean instanceExists(String instanceName) {
ZNRecord znRecord = _cacheInstanceConfigsDataAccessor.get("/" + instanceName, null, AccessOption.PERSISTENT);
return (znRecord != null);
}
代码示例来源:origin: org.apache.helix/helix-core
@Override
public List<T> getChildren(String parentPath, List<Stat> stats, int options) {
List<String> childNames = getChildNames(parentPath, options);
if (childNames == null) {
return null;
}
List<String> paths = new ArrayList<>();
for (String childName : childNames) {
String path = parentPath.equals("/") ? "/" + childName : parentPath + "/" + childName;
paths.add(path);
}
return get(paths, stats, options);
}
代码示例来源:origin: apache/helix
records = accessor.get(paths, null, 0);
for (int i = 0; i < 10; i++) {
Assert.assertEquals(records.get(i).getId(), "TestDB" + i);
代码示例来源:origin: apache/helix
@Override
public List<T> getChildren(String parentPath, List<Stat> stats, int options) {
List<String> childNames = getChildNames(parentPath, options);
if (childNames == null) {
return null;
}
List<String> paths = new ArrayList<>();
for (String childName : childNames) {
String path = parentPath.equals("/") ? "/" + childName : parentPath + "/" + childName;
paths.add(path);
}
return get(paths, stats, options);
}
代码示例来源:origin: apache/helix
records = accessor.get(paths, null, 0);
for (int i = 0; i < 10; i++) {
Assert.assertEquals(records.get(i).getId(), "TestDB" + i);
代码示例来源:origin: apache/incubator-pinot
/**
* Get the Helix instance config for the given instance Id.
*
* @param instanceId Instance Id
* @return Helix instance config
*/
public InstanceConfig getHelixInstanceConfig(@Nonnull String instanceId) {
ZNRecord znRecord = _cacheInstanceConfigsDataAccessor.get("/" + instanceId, null, AccessOption.PERSISTENT);
return znRecord != null ? new InstanceConfig(znRecord) : null;
}
代码示例来源:origin: apache/helix
ZNRecord record = accessor.get(path, null, 0);
Assert.assertEquals(record.getId(), "TestDB" + i);
代码示例来源:origin: apache/helix
@Override
public List<T> get(List<String> paths, List<Stat> stats, int options) {
return get(paths, stats, options, false);
}
代码示例来源:origin: org.apache.helix/helix-core
@Override
public List<T> get(List<String> paths, List<Stat> stats, int options) {
return get(paths, stats, options, false);
}
内容来源于网络,如有侵权,请联系作者删除!