hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/storage/ContainerProtocolCalls.java
public static void deleteContainer(XceiverClientSpi client,
      boolean force, String traceID) throws IOException {
    ContainerProtos.DeleteContainerRequestProto.Builder deleteRequest =
        ContainerProtos.DeleteContainerRequestProto.newBuilder();
    deleteRequest.setName(client.getPipeline().getContainerName());
    deleteRequest.setPipeline(client.getPipeline().getProtobufMessage());
    deleteRequest.setForceDelete(force);
    String id = client.getPipeline().getLeader().getUuidString();
    ContainerCommandRequestProto.Builder request =
        ContainerCommandRequestProto.newBuilder();
    request.setCmdType(ContainerProtos.Type.DeleteContainer);
    request.setDeleteContainer(deleteRequest);
    request.setTraceID(traceID);
    request.setDatanodeUuid(id);
    ContainerCommandResponseProto response =
        client.sendCommand(request.build());
    validateContainerResponse(response);
  }
/**
   * Deletes a container from a pipeline.
   *
   * @param client
   * @param force whether or not to forcibly delete the container.
   * @param traceID
   * @throws IOException
   */
Deletes a container from a pipeline.
@param client
@param force whether or not to forcibly delete the container.
@param traceID
@throws IOException
Deletes a container from a pipeline . @param client @param force whether or not to forcibly delete the container . @param traceID @throws IOException
public static void deleteContainer(XceiverClientSpi client,
      boolean force, String traceID) throws IOException {
    ContainerProtos.DeleteContainerRequestProto.Builder deleteRequest =
        ContainerProtos.DeleteContainerRequestProto.newBuilder();
    deleteRequest.setName(client.getPipeline().getContainerName());
    deleteRequest.setPipeline(client.getPipeline().getProtobufMessage());
    deleteRequest.setForceDelete(force);
    String id = client.getPipeline().getLeader().getUuidString();
    ContainerCommandRequestProto.Builder request =
        ContainerCommandRequestProto.newBuilder();
    request.setCmdType(ContainerProtos.Type.DeleteContainer);
    request.setDeleteContainer(deleteRequest);
    request.setTraceID(traceID);
    request.setDatanodeUuid(id);
    ContainerCommandResponseProto response =
        client.sendCommand(request.build());
    validateContainerResponse(response);
  }
public static void deleteContainer ( XceiverClientSpi client , boolean force , String traceID ) throws IOException { ContainerProtos . DeleteContainerRequestProto . Builder deleteRequest = ContainerProtos . DeleteContainerRequestProto . newBuilder ( ) ; deleteRequest . setName ( client . getPipeline ( ) . getContainerName ( ) ) ; deleteRequest . setPipeline ( client . getPipeline ( ) . getProtobufMessage ( ) ) ; deleteRequest . setForceDelete ( force ) ; String id = client . getPipeline ( ) . getLeader ( ) . getUuidString ( ) ; ContainerCommandRequestProto . Builder request = ContainerCommandRequestProto . newBuilder ( ) ; request . setCmdType ( ContainerProtos . Type . DeleteContainer ) ; request . setDeleteContainer ( deleteRequest ) ; request . setTraceID ( traceID ) ; request . setDatanodeUuid ( id ) ; ContainerCommandResponseProto response = client . sendCommand ( request . build ( ) ) ; validateContainerResponse ( response ) ; }
Deletes a container from a pipeline.
Deletes a container from a pipeline .