gpt4 book ai didi

org.apache.helix.manager.zk.ZkCacheBaseDataAccessor.get()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 13:44:31 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.helix.manager.zk.ZkCacheBaseDataAccessor.get()方法的一些代码示例,展示了ZkCacheBaseDataAccessor.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkCacheBaseDataAccessor.get()方法的具体详情如下:
包路径:org.apache.helix.manager.zk.ZkCacheBaseDataAccessor
类名称:ZkCacheBaseDataAccessor
方法名:get

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);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com