org.apache.samza.zk.ZkUtils.deleteOldVersionPath()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(145)

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

ZkUtils.deleteOldVersionPath介绍

暂无

代码示例

代码示例来源:origin: apache/samza

void deleteOldJobModels(int numVersionsToLeave) {
 // read current list of JMs
 String path = keyBuilder.getJobModelPathPrefix();
 LOG.info("About to delete jm path=" + path);
 List<String> znodeIds = zkClient.getChildren(path);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave, new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // jm version name format is <num>
   return Integer.valueOf(o1) - Integer.valueOf(o2);
  }
 });
}

代码示例来源:origin: apache/samza

void deleteOldBarrierVersions(int numVersionsToLeave) {
 // read current list of barriers
 String path = keyBuilder.getJobModelVersionBarrierPrefix();
 LOG.info("About to delete old barrier paths from " + path);
 List<String> znodeIds = zkClient.getChildren(path);
 LOG.info("List of all zkNodes: " + znodeIds);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave,  new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // barrier's name format is barrier_<num>
   return ZkBarrierForVersionUpgrade.getVersion(o1) - ZkBarrierForVersionUpgrade.getVersion(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core

void deleteOldJobModels(int numVersionsToLeave) {
 // read current list of JMs
 String path = keyBuilder.getJobModelPathPrefix();
 LOG.info("About to delete jm path=" + path);
 List<String> znodeIds = zkClient.getChildren(path);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave, new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // jm version name format is <num>
   return Integer.valueOf(o1) - Integer.valueOf(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.12

void deleteOldJobModels(int numVersionsToLeave) {
 // read current list of JMs
 String path = keyBuilder.getJobModelPathPrefix();
 LOG.info("About to delete jm path=" + path);
 List<String> znodeIds = zkClient.getChildren(path);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave, new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // jm version name format is <num>
   return Integer.valueOf(o1) - Integer.valueOf(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

void deleteOldJobModels(int numVersionsToLeave) {
 // read current list of JMs
 String path = keyBuilder.getJobModelPathPrefix();
 LOG.info("About to delete jm path=" + path);
 List<String> znodeIds = zkClient.getChildren(path);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave, new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // jm version name format is <num>
   return Integer.valueOf(o1) - Integer.valueOf(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core

void deleteOldBarrierVersions(int numVersionsToLeave) {
 // read current list of barriers
 String path = keyBuilder.getJobModelVersionBarrierPrefix();
 LOG.info("About to delete old barrier paths from " + path);
 List<String> znodeIds = zkClient.getChildren(path);
 LOG.info("List of all zkNodes: " + znodeIds);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave,  new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // barrier's name format is barrier_<num>
   return ZkBarrierForVersionUpgrade.getVersion(o1) - ZkBarrierForVersionUpgrade.getVersion(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

void deleteOldBarrierVersions(int numVersionsToLeave) {
 // read current list of barriers
 String path = keyBuilder.getJobModelVersionBarrierPrefix();
 LOG.info("About to delete old barrier paths from " + path);
 List<String> znodeIds = zkClient.getChildren(path);
 LOG.info("List of all zkNodes: " + znodeIds);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave,  new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // barrier's name format is barrier_<num>
   return ZkBarrierForVersionUpgrade.getVersion(o1) - ZkBarrierForVersionUpgrade.getVersion(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.12

void deleteOldBarrierVersions(int numVersionsToLeave) {
 // read current list of barriers
 String path = keyBuilder.getJobModelVersionBarrierPrefix();
 LOG.info("About to delete old barrier paths from " + path);
 List<String> znodeIds = zkClient.getChildren(path);
 LOG.info("List of all zkNodes: " + znodeIds);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave,  new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // barrier's name format is barrier_<num>
   return ZkBarrierForVersionUpgrade.getVersion(o1) - ZkBarrierForVersionUpgrade.getVersion(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

void deleteOldBarrierVersions(int numVersionsToLeave) {
 // read current list of barriers
 String path = keyBuilder.getJobModelVersionBarrierPrefix();
 LOG.info("About to delete old barrier paths from " + path);
 List<String> znodeIds = zkClient.getChildren(path);
 LOG.info("List of all zkNodes: " + znodeIds);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave,  new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // barrier's name format is barrier_<num>
   return ZkBarrierForVersionUpgrade.getVersion(o1) - ZkBarrierForVersionUpgrade.getVersion(o2);
  }
 });
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

void deleteOldJobModels(int numVersionsToLeave) {
 // read current list of JMs
 String path = keyBuilder.getJobModelPathPrefix();
 LOG.info("About to delete jm path=" + path);
 List<String> znodeIds = zkClient.getChildren(path);
 deleteOldVersionPath(path, znodeIds, numVersionsToLeave, new Comparator<String>() {
  @Override
  public int compare(String o1, String o2) {
   // jm version name format is <num>
   return Integer.valueOf(o1) - Integer.valueOf(o2);
  }
 });
}

代码示例来源:origin: apache/samza

zkUtils.deleteOldVersionPath(pathA, zNodeIds, 10, new Comparator<String>() {
 @Override
 public int compare(String o1, String o2) {
zkUtils.deleteOldVersionPath(pathA, zNodeIds, 10, new Comparator<String>() {
 @Override
 public int compare(String o1, String o2) {
zkUtils.deleteOldVersionPath(pathB, zNodeIds, 1, new Comparator<String>() {
 @Override
 public int compare(String o1, String o2) {

相关文章