Beispiel #1
0
  // 模拟创建一个终结节点
  protected void initTermin(Long processId) {
    TerminEventData data = new TerminEventData();
    data.setPipelineId(pipelineId);
    data.setProcessId(processId);
    data.setType(TerminType.NORMAL);

    byte[] bytes = JsonUtils.marshalToByte(data);
    zookeeper.create(StagePathUtils.getTermin(pipelineId, processId), bytes, CreateMode.PERSISTENT);
  }
Beispiel #2
0
 // 模拟删除一个终结节点
 protected void destoryTermin(Long processId) {
   zookeeper.delete(StagePathUtils.getTermin(pipelineId, processId));
 }