hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/Dispatcher.java
private ContainerCommandResponseProto handleDeleteContainer(
      ContainerCommandRequestProto msg) throws IOException {

    if (!msg.hasDeleteContainer()) {
      LOG.debug("Malformed delete container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }

    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getDeleteContainer().getPipeline());
    Preconditions.checkNotNull(pipeline);
    String name = msg.getDeleteContainer().getName();
    boolean forceDelete = msg.getDeleteContainer().getForceDelete();
    this.containerManager.deleteContainer(pipeline, name, forceDelete);
    return ContainerUtils.getContainerResponse(msg);
  }
/**
   * Calls into container logic and returns appropriate response.
   *
   * @param msg - Request
   * @return Response.
   * @throws IOException
   */
Calls into container logic and returns appropriate response.
@param msg - Request
@return Response.
Calls into container logic and returns appropriate response . @param msg - Request @return Response .
private ContainerCommandResponseProto handleDeleteContainer(
      ContainerCommandRequestProto msg) throws IOException {
    if (!msg.hasDeleteContainer()) {
      LOG.debug("Malformed delete container request. trace ID: {}",
          msg.getTraceID());
      return ContainerUtils.malformedRequest(msg);
    }
    Pipeline pipeline = Pipeline.getFromProtoBuf(
        msg.getDeleteContainer().getPipeline());
    Preconditions.checkNotNull(pipeline);
    String name = msg.getDeleteContainer().getName();
    boolean forceDelete = msg.getDeleteContainer().getForceDelete();
    this.containerManager.deleteContainer(pipeline, name, forceDelete);
    return ContainerUtils.getContainerResponse(msg);
  }
private ContainerCommandResponseProto handleDeleteContainer ( ContainerCommandRequestProto msg ) throws IOException { if ( ! msg . hasDeleteContainer ( ) ) { LOG . debug ( "Malformed delete container request. trace ID: {}" , msg . getTraceID ( ) ) ; return ContainerUtils . malformedRequest ( msg ) ; } Pipeline pipeline = Pipeline . getFromProtoBuf ( msg . getDeleteContainer ( ) . getPipeline ( ) ) ; Preconditions . checkNotNull ( pipeline ) ; String name = msg . getDeleteContainer ( ) . getName ( ) ; boolean forceDelete = msg . getDeleteContainer ( ) . getForceDelete ( ) ; this . containerManager . deleteContainer ( pipeline , name , forceDelete ) ; return ContainerUtils . getContainerResponse ( msg ) ; }
Calls into container logic and returns appropriate response.
Calls into container logic and returns appropriate response .