public synchronized boolean hasPipeTaskInConsensusGroup(final int consensusGroupId) {
    return pipeMap.entrySet().stream()
        .filter(entry -> entry.getKey().getPipeType() != PipeType.CONSENSUS)
        .anyMatch(entry -> entry.getValue().containsKey(consensusGroupId));
  }
Judge whether there is a {@link PipeTask} related to the consensus group id.

@param consensusGroupId consensus group id
@return true if there is at least one {@link PipeTask} related to the consensus group id, false
    otherwise
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/PipeTaskManager.java