gpt4 book ai didi

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

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

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

ZooKeeperStateHandleStore.<init>介绍

[英]Creates a ZooKeeperStateHandleStore.
[中]创建ZookePerstateHandleStore。

代码示例

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

/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
    String zkStateHandleStorePath,
    RetrievableStateStorageHelper<T> stateStorageHelper) throws Exception {
  facade.newNamespaceAwareEnsurePath(zkStateHandleStorePath).ensure(facade.getZookeeperClient());
  CuratorFramework stateHandleStoreFacade = facade.usingNamespace(
    ZooKeeperUtils.generateZookeeperPath(
      facade.getNamespace(),
      zkStateHandleStorePath));
  return new ZooKeeperStateHandleStore<>(stateHandleStoreFacade, stateStorageHelper);
}

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

/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
    String zkStateHandleStorePath,
    RetrievableStateStorageHelper<T> stateStorageHelper) throws Exception {
  facade.newNamespaceAwareEnsurePath(zkStateHandleStorePath).ensure(facade.getZookeeperClient());
  CuratorFramework stateHandleStoreFacade = facade.usingNamespace(
    ZooKeeperUtils.generateZookeeperPath(
      facade.getNamespace(),
      zkStateHandleStorePath));
  return new ZooKeeperStateHandleStore<>(stateHandleStoreFacade, stateStorageHelper);
}

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

/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param executor to run asynchronous callbacks of the state handle store
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
    String zkStateHandleStorePath,
    RetrievableStateStorageHelper<T> stateStorageHelper,
    Executor executor) throws Exception {
  facade.newNamespaceAwareEnsurePath(zkStateHandleStorePath).ensure(facade.getZookeeperClient());
  CuratorFramework stateHandleStoreFacade = facade.usingNamespace(
    ZooKeeperUtils.generateZookeeperPath(
      facade.getNamespace(),
      zkStateHandleStorePath));
  return new ZooKeeperStateHandleStore<>(stateHandleStoreFacade, stateStorageHelper, executor);
}

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

this.checkpointsInZooKeeper = new ZooKeeperStateHandleStore<>(this.client, stateStorage, executor);

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

/**
 * Creates a {@link ZooKeeperStateHandleStore} instance with the provided arguments.
 *
 * @param zkStateHandleStorePath specifying the path in ZooKeeper to store the state handles to
 * @param stateStorageHelper storing the actual state data
 * @param executor to run asynchronous callbacks of the state handle store
 * @param <T> Type of the state to be stored
 * @return a ZooKeeperStateHandleStore instance
 * @throws Exception if ZooKeeper could not create the provided state handle store path in
 *     ZooKeeper
 */
public <T extends Serializable> ZooKeeperStateHandleStore<T> createZooKeeperStateHandleStore(
    String zkStateHandleStorePath,
    RetrievableStateStorageHelper<T> stateStorageHelper,
    Executor executor) throws Exception {
  facade.newNamespaceAwareEnsurePath(zkStateHandleStorePath).ensure(facade.getZookeeperClient());
  CuratorFramework stateHandleStoreFacade = facade.usingNamespace(
    ZooKeeperUtils.generateZookeeperPath(
      facade.getNamespace(),
      zkStateHandleStorePath));
  return new ZooKeeperStateHandleStore<>(stateHandleStoreFacade, stateStorageHelper, executor);
}

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

this.checkpointsInZooKeeper = new ZooKeeperStateHandleStore<>(this.client, stateStorage, executor);

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

this.checkpointsInZooKeeper = new ZooKeeperStateHandleStore<>(this.client, stateStorage);

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

this.checkpointsInZooKeeper = new ZooKeeperStateHandleStore<>(this.client, stateStorage);

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

/**
 * Submitted job graph store backed by ZooKeeper.
 *
 * @param client ZooKeeper client
 * @param currentJobsPath ZooKeeper path for current job graphs
 * @param stateStorage State storage used to persist the submitted jobs
 * @throws Exception
 */
public ZooKeeperSubmittedJobGraphStore(
    CuratorFramework client,
    String currentJobsPath,
    RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage) throws Exception {
  checkNotNull(currentJobsPath, "Current jobs path");
  checkNotNull(stateStorage, "State storage");
  // Keep a reference to the original client and not the namespace facade. The namespace
  // facade cannot be closed.
  this.client = checkNotNull(client, "Curator client");
  // Ensure that the job graphs path exists
  client.newNamespaceAwareEnsurePath(currentJobsPath)
      .ensure(client.getZookeeperClient());
  // All operations will have the path as root
  CuratorFramework facade = client.usingNamespace(client.getNamespace() + currentJobsPath);
  this.zooKeeperFullBasePath = client.getNamespace() + currentJobsPath;
  this.jobGraphsInZooKeeper = new ZooKeeperStateHandleStore<>(facade, stateStorage);
  this.pathCache = new PathChildrenCache(facade, "/", false);
  pathCache.getListenable().addListener(new SubmittedJobGraphsPathCacheListener());
}

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

/**
 * Submitted job graph store backed by ZooKeeper.
 *
 * @param client ZooKeeper client
 * @param currentJobsPath ZooKeeper path for current job graphs
 * @param stateStorage State storage used to persist the submitted jobs
 * @throws Exception
 */
public ZooKeeperSubmittedJobGraphStore(
    CuratorFramework client,
    String currentJobsPath,
    RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage) throws Exception {
  checkNotNull(currentJobsPath, "Current jobs path");
  checkNotNull(stateStorage, "State storage");
  // Keep a reference to the original client and not the namespace facade. The namespace
  // facade cannot be closed.
  this.client = checkNotNull(client, "Curator client");
  // Ensure that the job graphs path exists
  client.newNamespaceAwareEnsurePath(currentJobsPath)
      .ensure(client.getZookeeperClient());
  // All operations will have the path as root
  CuratorFramework facade = client.usingNamespace(client.getNamespace() + currentJobsPath);
  this.zooKeeperFullBasePath = client.getNamespace() + currentJobsPath;
  this.jobGraphsInZooKeeper = new ZooKeeperStateHandleStore<>(facade, stateStorage);
  this.pathCache = new PathChildrenCache(facade, "/", false);
  pathCache.getListenable().addListener(new SubmittedJobGraphsPathCacheListener());
}

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

/**
 * Submitted job graph store backed by ZooKeeper
 *
 * @param client ZooKeeper client
 * @param currentJobsPath ZooKeeper path for current job graphs
 * @param stateStorage State storage used to persist the submitted jobs
 * @param executor to give to the ZooKeeperStateHandleStore to run ZooKeeper callbacks
 * @throws Exception
 */
public ZooKeeperSubmittedJobGraphStore(
    CuratorFramework client,
    String currentJobsPath,
    RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage,
    Executor executor) throws Exception {
  checkNotNull(currentJobsPath, "Current jobs path");
  checkNotNull(stateStorage, "State storage");
  // Keep a reference to the original client and not the namespace facade. The namespace
  // facade cannot be closed.
  this.client = checkNotNull(client, "Curator client");
  // Ensure that the job graphs path exists
  client.newNamespaceAwareEnsurePath(currentJobsPath)
      .ensure(client.getZookeeperClient());
  // All operations will have the path as root
  CuratorFramework facade = client.usingNamespace(client.getNamespace() + currentJobsPath);
  this.zooKeeperFullBasePath = client.getNamespace() + currentJobsPath;
  this.jobGraphsInZooKeeper = new ZooKeeperStateHandleStore<>(facade, stateStorage, executor);
  this.pathCache = new PathChildrenCache(facade, "/", false);
  pathCache.getListenable().addListener(new SubmittedJobGraphsPathCacheListener());
}

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

/**
 * Submitted job graph store backed by ZooKeeper
 *
 * @param client ZooKeeper client
 * @param currentJobsPath ZooKeeper path for current job graphs
 * @param stateStorage State storage used to persist the submitted jobs
 * @param executor to give to the ZooKeeperStateHandleStore to run ZooKeeper callbacks
 * @throws Exception
 */
public ZooKeeperSubmittedJobGraphStore(
    CuratorFramework client,
    String currentJobsPath,
    RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage,
    Executor executor) throws Exception {
  checkNotNull(currentJobsPath, "Current jobs path");
  checkNotNull(stateStorage, "State storage");
  // Keep a reference to the original client and not the namespace facade. The namespace
  // facade cannot be closed.
  this.client = checkNotNull(client, "Curator client");
  // Ensure that the job graphs path exists
  client.newNamespaceAwareEnsurePath(currentJobsPath)
      .ensure(client.getZookeeperClient());
  // All operations will have the path as root
  CuratorFramework facade = client.usingNamespace(client.getNamespace() + currentJobsPath);
  this.zooKeeperFullBasePath = client.getNamespace() + currentJobsPath;
  this.jobGraphsInZooKeeper = new ZooKeeperStateHandleStore<>(facade, stateStorage, executor);
  this.pathCache = new PathChildrenCache(facade, "/", false);
  pathCache.getListenable().addListener(new SubmittedJobGraphsPathCacheListener());
}

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