@AfterMethod public void tearDown() { // 删除mainStem节点 String path = StagePathUtils.getPipeline(pipelineId) + "/" + ArbitrateConstants.NODE_MAINSTEM; zookeeper.delete(path); nodeEvent.destory(one.getId()); // 关闭pipeline pipelineEvent.destory(channelId, pipelineId); channelEvent.destory(channelId); }
@AfterClass public void destory() { ArbitrateFactory.destory(pipelineId); // 删除mainStem节点 String path = pipelinePath + "/" + ArbitrateConstants.NODE_MAINSTEM; zookeeper.delete(path); pipelineEvent.destory(channelId, pipelineId); channelEvent.destory(channelId); }
public void removeCanalCursor(String destination, short clientId) { String path = String.format(CANAL_CURSOR_PATH, destination, String.valueOf(clientId)); zookeeper.delete(path); }
// 模拟删除一个终结节点 protected void destoryTermin(Long processId) { zookeeper.delete(StagePathUtils.getTermin(pipelineId, processId)); }
// 模拟销毁一个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); }