Collections.sort(currentStages, new StageComparator());
} catch (ZkNoNodeException e) {
// ignore,说明节点已经被删除了
return false;
} catch (ZkException e) {
throw new ArbitrateException("Termin_process", e);
}
// 按顺序删除对应的S.E.T.L节点
// s节点
if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_SELECTED)) {
try {
boolean successed = zookeeper.delete(StagePathUtils.getSelectStage(pipelineId, processId));
if (!successed) {
processDeleteFailed();
}
} catch (ZkException e) {
throw new ArbitrateException("Termin_process", e);
}
}
// e节点
if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_EXTRACTED)) {
try {
boolean successed = zookeeper.delete(StagePathUtils.getExtractStage(pipelineId, processId));
if (!successed) {
processDeleteFailed();
}
} catch (ZkException e) {
throw new ArbitrateException("Termin_process", e);
}
}
// t节点
if (currentStages == null || currentStages.contains(ArbitrateConstants.NODE_TRANSFORMED)) {
try {
boolean successed = zookeeper.delete(StagePathUtils.getTransformStage(pipelineId, processId));
if (!successed) {
processDeleteFailed();
}
} catch (ZkException e) {
throw new ArbitrateException("Termin_process", e);
}
}
// l节点
// try {
// zookeeper.delete(StagePathUtils.getLoadStage(pipelineId, processId), -1, new VoidCallback() {