Search in sources :

Example 1 with GetContainerWithPipelineRequestProto

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

the class StorageContainerLocationProtocolClientSideTranslatorPB method getContainerWithPipeline.

/**
 * {@inheritDoc}
 */
@Override
public ContainerWithPipeline getContainerWithPipeline(long containerID) throws IOException {
    Preconditions.checkState(containerID >= 0, "Container ID cannot be negative");
    GetContainerWithPipelineRequestProto request = GetContainerWithPipelineRequestProto.newBuilder().setTraceID(TracingUtil.exportCurrentSpan()).setContainerID(containerID).build();
    ScmContainerLocationResponse response = submitRequest(Type.GetContainerWithPipeline, (builder) -> builder.setGetContainerWithPipelineRequest(request));
    return ContainerWithPipeline.fromProtobuf(response.getGetContainerWithPipelineResponse().getContainerWithPipeline());
}
Also used : ScmContainerLocationResponse(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationResponse) GetContainerWithPipelineRequestProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineRequestProto)

Aggregations

GetContainerWithPipelineRequestProto (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerWithPipelineRequestProto)1 ScmContainerLocationResponse (org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ScmContainerLocationResponse)1