gpt4 book ai didi

org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore.getAllPaths()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 20:47:31 27 4
gpt4 key购买 nike

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

ZooKeeperStateHandleStore.getAllPaths介绍

[英]Return a list of all valid paths for state handles.
[中]返回状态句柄的所有有效路径的列表。

代码示例

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

@Override
public Collection<JobID> getJobIds() throws Exception {
  Collection<String> paths;
  LOG.debug("Retrieving all stored job ids from ZooKeeper under {}.", zooKeeperFullBasePath);
  try {
    paths = jobGraphsInZooKeeper.getAllPaths();
  } catch (Exception e) {
    throw new Exception("Failed to retrieve entry paths from ZooKeeperStateHandleStore.", e);
  }
  List<JobID> jobIds = new ArrayList<>(paths.size());
  for (String path : paths) {
    try {
      jobIds.add(jobIdfromPath(path));
    } catch (Exception exception) {
      LOG.warn("Could not parse job id from {}. This indicates a malformed path.", path, exception);
    }
  }
  return jobIds;
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

@Override
public Collection<JobID> getJobIds() throws Exception {
  Collection<String> paths;
  LOG.debug("Retrieving all stored job ids from ZooKeeper under {}.", zooKeeperFullBasePath);
  try {
    paths = jobGraphsInZooKeeper.getAllPaths();
  } catch (Exception e) {
    throw new Exception("Failed to retrieve entry paths from ZooKeeperStateHandleStore.", e);
  }
  List<JobID> jobIds = new ArrayList<>(paths.size());
  for (String path : paths) {
    try {
      jobIds.add(jobIdfromPath(path));
    } catch (Exception exception) {
      LOG.warn("Could not parse job id from {}. This indicates a malformed path.", path, exception);
    }
  }
  return jobIds;
}

代码示例来源:origin: org.apache.flink/flink-runtime

@Override
public Collection<JobID> getJobIds() throws Exception {
  Collection<String> paths;
  LOG.debug("Retrieving all stored job ids from ZooKeeper under {}.", zooKeeperFullBasePath);
  try {
    paths = jobGraphsInZooKeeper.getAllPaths();
  } catch (Exception e) {
    throw new Exception("Failed to retrieve entry paths from ZooKeeperStateHandleStore.", e);
  }
  List<JobID> jobIds = new ArrayList<>(paths.size());
  for (String path : paths) {
    try {
      jobIds.add(jobIdfromPath(path));
    } catch (Exception exception) {
      LOG.warn("Could not parse job id from {}. This indicates a malformed path.", path, exception);
    }
  }
  return jobIds;
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

@Override
public Collection<JobID> getJobIds() throws Exception {
  Collection<String> paths;
  LOG.debug("Retrieving all stored job ids from ZooKeeper under {}.", zooKeeperFullBasePath);
  try {
    paths = jobGraphsInZooKeeper.getAllPaths();
  } catch (Exception e) {
    throw new Exception("Failed to retrieve entry paths from ZooKeeperStateHandleStore.", e);
  }
  List<JobID> jobIds = new ArrayList<>(paths.size());
  for (String path : paths) {
    try {
      jobIds.add(jobIdfromPath(path));
    } catch (Exception exception) {
      LOG.warn("Could not parse job id from {}. This indicates a malformed path.", path, exception);
    }
  }
  return jobIds;
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStore.
 *
 * @throws Exception if the delete operation of a lock file fails
 */
public void releaseAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child: children) {
    try {
      release(child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release all state nodes.", exception);
  }
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStore.
 *
 * @throws Exception if the delete operation of a lock file fails
 */
public void releaseAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child: children) {
    try {
      release(child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release all state nodes.", exception);
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStores and tries to remove all state nodes which
 * are not locked anymore.
 *
 * <p>The delete operation is executed asynchronously
 *
 * @throws Exception if the delete operation fails
 */
public void releaseAndTryRemoveAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child : children) {
    try {
      releaseAndTryRemove('/' + child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release and try removing all state nodes.", exception);
  }
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStores and tries to remove all state nodes which
 * are not locked anymore.
 *
 * <p>The delete operation is executed asynchronously
 *
 * @throws Exception if the delete operation fails
 */
public void releaseAndTryRemoveAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child : children) {
    try {
      releaseAndTryRemove('/' + child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release and try removing all state nodes.", exception);
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStore.
 *
 * @throws Exception if the delete operation of a lock file fails
 */
public void releaseAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child: children) {
    try {
      release(child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release all state nodes.", exception);
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStore.
 *
 * @throws Exception if the delete operation of a lock file fails
 */
public void releaseAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child: children) {
    try {
      release(child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release all state nodes.", exception);
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStores and tries to remove all state nodes which
 * are not locked anymore.
 *
 * <p>The delete operation is executed asynchronously
 *
 * @throws Exception if the delete operation fails
 */
public void releaseAndTryRemoveAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child : children) {
    try {
      releaseAndTryRemove('/' + child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release and try removing all state nodes.", exception);
  }
}

代码示例来源:origin: org.apache.flink/flink-runtime

/**
 * Releases all lock nodes of this ZooKeeperStateHandleStores and tries to remove all state nodes which
 * are not locked anymore.
 *
 * <p>The delete operation is executed asynchronously
 *
 * @throws Exception if the delete operation fails
 */
public void releaseAndTryRemoveAll() throws Exception {
  Collection<String> children = getAllPaths();
  Exception exception = null;
  for (String child : children) {
    try {
      releaseAndTryRemove('/' + child);
    } catch (Exception e) {
      exception = ExceptionUtils.firstOrSuppressed(e, exception);
    }
  }
  if (exception != null) {
    throw new Exception("Could not properly release and try removing all state nodes.", exception);
  }
}

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