public synchronized PipeTask removePipeTask(PipeStaticMeta pipeStaticMeta, int consensusGroupId) {
    Map<Integer, PipeTask> consensusGroupIdPipeTaskMap = pipeMap.get(pipeStaticMeta);
    if (consensusGroupIdPipeTaskMap != null) {
      return consensusGroupIdPipeTaskMap.remove(consensusGroupId);
    }
    return null;
  }
Remove {@link PipeTask} by {@link PipeStaticMeta} and consensus group id.

@param pipeStaticMeta {@link PipeStaticMeta}
@param consensusGroupId consensus group id
@return {@link PipeTask} if exists, {@code null} otherwise
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/PipeTaskManager.java