public synchronized void drop() {
    if (status == null) {
      throw new PipeException(MESSAGE_PIPE_TASK_STAGE_HAS_NOT_BEEN_CREATED);
    }
    if (status == PipeStatus.DROPPED) {
      // Do nothing to allow retry strategy
      return;
    }

    // MUST stop the subtask before dropping it, otherwise
    // the subtask might be in an inconsistent state!
    stop();

    // status == PipeStatus.STOPPED, drop the connector
    dropSubtask();

    status = PipeStatus.DROPPED;
  }
Drop a {@link PipeTaskStage}.

@throws PipeException if failed to drop a {@link PipeTaskStage}.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/stage/PipeTaskStage.java