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