gpt4 book ai didi

org.apache.flink.shaded.curator.org.apache.curator.utils.ZKPaths类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:02:03 27 4
gpt4 key购买 nike

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

ZKPaths介绍

暂无

代码示例

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

/**
   * Returns a JobID for the event's path.
   */
  private JobID fromEvent(PathChildrenCacheEvent event) {
    return JobID.fromHexString(ZKPaths.getNodeFromPath(event.getData().getPath()));
  }
}

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

@Override
public void shutdown(JobStatus jobStatus) throws Exception {
  if (jobStatus.isGloballyTerminalState()) {
    LOG.info("Shutting down");
    for (CompletedCheckpoint checkpoint : completedCheckpoints) {
      try {
        removeShutdown(checkpoint, jobStatus);
      } catch (Exception e) {
        LOG.error("Failed to discard checkpoint.", e);
      }
    }
    completedCheckpoints.clear();
    String path = "/" + client.getNamespace();
    LOG.info("Removing {} from ZooKeeper", path);
    ZKPaths.deleteChildren(client.getZookeeperClient().getZooKeeper(), path, true);
  } else {
    LOG.info("Suspending");
    // Clear the local handles, but don't remove any state
    completedCheckpoints.clear();
    // Release the state handle locks in ZooKeeper such that they can be deleted
    checkpointsInZooKeeper.releaseAll();
  }
}

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

List<String> children = ZKPaths.getSortedChildren(
    client.getZookeeperClient().getZooKeeper(),
    ZKPaths.fixForNamespace(client.getNamespace(), "/"));

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

@Override
public void shutdown(JobStatus jobStatus) throws Exception {
  if (jobStatus.isGloballyTerminalState()) {
    LOG.info("Shutting down");
    for (CompletedCheckpoint checkpoint : completedCheckpoints) {
      tryRemoveCompletedCheckpoint(
        checkpoint,
        completedCheckpoint -> completedCheckpoint.discardOnShutdown(jobStatus));
    }
    completedCheckpoints.clear();
    String path = "/" + client.getNamespace();
    LOG.info("Removing {} from ZooKeeper", path);
    ZKPaths.deleteChildren(client.getZookeeperClient().getZooKeeper(), path, true);
  } else {
    LOG.info("Suspending");
    // Clear the local handles, but don't remove any state
    completedCheckpoints.clear();
    // Release the state handle locks in ZooKeeper such that they can be deleted
    checkpointsInZooKeeper.releaseAll();
  }
}

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

/**
   * Returns a JobID for the event's path.
   */
  private JobID fromEvent(PathChildrenCacheEvent event) {
    return JobID.fromHexString(ZKPaths.getNodeFromPath(event.getData().getPath()));
  }
}

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

@Override
public void shutdown(JobStatus jobStatus) throws Exception {
  if (jobStatus.isGloballyTerminalState()) {
    LOG.info("Shutting down");
    for (CompletedCheckpoint checkpoint : completedCheckpoints) {
      tryRemoveCompletedCheckpoint(
        checkpoint,
        completedCheckpoint -> completedCheckpoint.discardOnShutdown(jobStatus));
    }
    completedCheckpoints.clear();
    String path = "/" + client.getNamespace();
    LOG.info("Removing {} from ZooKeeper", path);
    ZKPaths.deleteChildren(client.getZookeeperClient().getZooKeeper(), path, true);
  } else {
    LOG.info("Suspending");
    // Clear the local handles, but don't remove any state
    completedCheckpoints.clear();
    // Release the state handle locks in ZooKeeper such that they can be deleted
    checkpointsInZooKeeper.releaseAll();
  }
}

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

/**
   * Returns a JobID for the event's path.
   */
  private JobID fromEvent(PathChildrenCacheEvent event) {
    return JobID.fromHexString(ZKPaths.getNodeFromPath(event.getData().getPath()));
  }
}

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