예제 #1
0
  // 模拟创建一个带数据的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);
  }
예제 #2
0
 // 模拟创建一个stage节点
 protected void initStage(Long processId, String stageNode) {
   String path = processPath + "/" + StagePathUtils.getProcessNode(processId) + "/" + stageNode;
   zookeeper.create(path, new byte[0], CreateMode.PERSISTENT);
 }
예제 #3
0
  // 模拟销毁一个stage节点
  protected void destoryStage(Long processId, String stageNode) {
    String path = processPath + "/" + StagePathUtils.getProcessNode(processId) + "/" + stageNode;

    zookeeper.delete(path);
  }
예제 #4
0
 // 模拟销毁一个process
 protected void destoryProcess(Long processId) {
   String path = processPath + "/" + StagePathUtils.getProcessNode(processId);
   zookeeper.delete(path);
 }