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());
}
Aggregations