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

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

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

ZkUtils.deleteOldBarrierVersions介绍

暂无

代码示例

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

/**
 * cleanup old data from ZK
 * @param numVersionsToLeave - number of versions to leave
 */
public void cleanupZK(int numVersionsToLeave) {
 deleteOldBarrierVersions(numVersionsToLeave);
 deleteOldJobModels(numVersionsToLeave);
}

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

/**
 * cleanup old data from ZK
 * @param numVersionsToLeave - number of versions to leave
 */
public void cleanupZK(int numVersionsToLeave) {
 deleteOldBarrierVersions(numVersionsToLeave);
 deleteOldJobModels(numVersionsToLeave);
}

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

/**
 * cleanup old data from ZK
 * @param numVersionsToLeave - number of versions to leave
 */
public void cleanupZK(int numVersionsToLeave) {
 deleteOldBarrierVersions(numVersionsToLeave);
 deleteOldJobModels(numVersionsToLeave);
}

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

/**
 * cleanup old data from ZK
 * @param numVersionsToLeave - number of versions to leave
 */
public void cleanupZK(int numVersionsToLeave) {
 deleteOldBarrierVersions(numVersionsToLeave);
 deleteOldJobModels(numVersionsToLeave);
}

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

/**
 * cleanup old data from ZK
 * @param numVersionsToLeave - number of versions to leave
 */
public void cleanupZK(int numVersionsToLeave) {
 deleteOldBarrierVersions(numVersionsToLeave);
 deleteOldJobModels(numVersionsToLeave);
}

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

@Test
public void testCleanUpZkBarrierVersion() {
 String root = zkUtils.getKeyBuilder().getJobModelVersionBarrierPrefix();
 zkUtils.getZkClient().createPersistent(root, true);
 ZkBarrierForVersionUpgrade barrier = new ZkBarrierForVersionUpgrade(root, zkUtils, null, null);
 for (int i = 200; i < 210; i++) {
  barrier.create(String.valueOf(i), new ArrayList<>(Arrays.asList(i + "a", i + "b", i + "c")));
 }
 zkUtils.deleteOldBarrierVersions(5);
 List<String> zNodeIds = zkUtils.getZkClient().getChildren(root);
 Collections.sort(zNodeIds);
 Assert.assertEquals(Arrays.asList("barrier_205", "barrier_206", "barrier_207", "barrier_208", "barrier_209"),
   zNodeIds);
}

相关文章