Search in sources :

Example 1 with SCMDeleteContainerRequestProto

use of org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto in project ozone by apache.

the class StorageContainerLocationProtocolClientSideTranslatorPB method deleteContainer.

/**
 * Ask SCM to delete a container by name. SCM will remove
 * the container mapping in its database.
 */
@Override
public void deleteContainer(long containerID) throws IOException {
    Preconditions.checkState(containerID >= 0, "Container ID cannot be negative");
    SCMDeleteContainerRequestProto request = SCMDeleteContainerRequestProto.newBuilder().setTraceID(TracingUtil.exportCurrentSpan()).setContainerID(containerID).build();
    submitRequest(Type.DeleteContainer, builder -> builder.setScmDeleteContainerRequest(request));
}
Also used : SCMDeleteContainerRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto)

Aggregations

SCMDeleteContainerRequestProto (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto)1