// 模拟创建一个带数据的stage节点 protected void initStage(Long processId, String stageNode, EtlEventData event) { String path = processPath + "/" + StagePathUtils.getProcessNode(processId) + "/" + stageNode; byte[] datas = JsonUtils.marshalToByte(event); zookeeper.create(path, datas, CreateMode.PERSISTENT); }
// 模拟创建一个stage节点 protected void initStage(Long processId, String stageNode) { String path = processPath + "/" + StagePathUtils.getProcessNode(processId) + "/" + stageNode; zookeeper.create(path, new byte[0], CreateMode.PERSISTENT); }
// 模拟销毁一个stage节点 protected void destoryStage(Long processId, String stageNode) { String path = processPath + "/" + StagePathUtils.getProcessNode(processId) + "/" + stageNode; zookeeper.delete(path); }
// 模拟销毁一个process protected void destoryProcess(Long processId) { String path = processPath + "/" + StagePathUtils.getProcessNode(processId); zookeeper.delete(path); }