本文整理了Java中org.apache.samza.zk.ZkUtils.deleteOldBarrierVersions()
方法的一些代码示例,展示了ZkUtils.deleteOldBarrierVersions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkUtils.deleteOldBarrierVersions()
方法的具体详情如下:
包路径:org.apache.samza.zk.ZkUtils
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!