本文整理了Java中org.apache.helix.manager.zk.ZKHelixDataAccessor.getChildNames()
方法的一些代码示例,展示了ZKHelixDataAccessor.getChildNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKHelixDataAccessor.getChildNames()
方法的具体详情如下:
包路径:org.apache.helix.manager.zk.ZKHelixDataAccessor
类名称:ZKHelixDataAccessor
方法名:getChildNames
暂无
代码示例来源:origin: apache/incubator-pinot
ZKHelixDataAccessor zkHelixDataAccessor = new ZKHelixDataAccessor(_clusterName, baseDataAccessor);
PropertyKey property = zkHelixDataAccessor.keyBuilder().liveInstances();
List<String> liveInstances = zkHelixDataAccessor.getChildNames(property);
代码示例来源:origin: apache/helix
accessor.getChildNames(accessor.keyBuilder().idealStates());
代码示例来源:origin: org.apache.helix/helix-core
accessor.getChildNames(accessor.keyBuilder().idealStates());
代码示例来源:origin: apache/helix
List<String> sessions = _dataAccessor.getChildNames(_keyBuilder.sessions(_instanceName));
代码示例来源:origin: org.apache.helix/helix-core
List<String> sessions = _dataAccessor.getChildNames(_keyBuilder.sessions(_instanceName));
代码示例来源:origin: apache/helix
public static boolean verifyEmptyCurStateAndExtView(String clusterName, String resourceName,
Set<String> instanceNames, String zkAddr) {
HelixZkClient zkClient = SharedZkClientFactory.getInstance()
.buildZkClient(new HelixZkClient.ZkConnectionConfig(zkAddr));
zkClient.setZkSerializer(new ZNRecordSerializer());
try {
ZKHelixDataAccessor accessor =
new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(zkClient));
Builder keyBuilder = accessor.keyBuilder();
for (String instanceName : instanceNames) {
List<String> sessionIds = accessor.getChildNames(keyBuilder.sessions(instanceName));
for (String sessionId : sessionIds) {
CurrentState curState =
accessor.getProperty(keyBuilder.currentState(instanceName, sessionId, resourceName));
if (curState != null && curState.getRecord().getMapFields().size() != 0) {
return false;
}
}
ExternalView extView = accessor.getProperty(keyBuilder.externalView(resourceName));
if (extView != null && extView.getRecord().getMapFields().size() != 0) {
return false;
}
}
return true;
} finally {
zkClient.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!