use of org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainerReplicasRequestProto in project ozone by apache.
the class StorageContainerLocationProtocolClientSideTranslatorPB method getContainerReplicas.
/**
* {@inheritDoc}
*/
@Override
public List<HddsProtos.SCMContainerReplicaProto> getContainerReplicas(long containerID) throws IOException {
Preconditions.checkState(containerID >= 0, "Container ID cannot be negative");
GetContainerReplicasRequestProto request = GetContainerReplicasRequestProto.newBuilder().setTraceID(TracingUtil.exportCurrentSpan()).setContainerID(containerID).build();
ScmContainerLocationResponse response = submitRequest(Type.GetContainerReplicas, (builder) -> builder.setGetContainerReplicasRequest(request));
return response.getGetContainerReplicasResponse().getContainerReplicaList();
}
Aggregations