use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.GetScmInfoResponseProto in project ozone by apache.
the class StorageContainerLocationProtocolClientSideTranslatorPB method getScmInfo.
@Override
public ScmInfo getScmInfo() throws IOException {
HddsProtos.GetScmInfoRequestProto request = HddsProtos.GetScmInfoRequestProto.newBuilder().setTraceID(TracingUtil.exportCurrentSpan()).build();
GetScmInfoResponseProto resp = submitRequest(Type.GetScmInfo, builder -> builder.setGetScmInfoRequest(request)).getGetScmInfoResponse();
ScmInfo.Builder builder = new ScmInfo.Builder().setClusterId(resp.getClusterId()).setScmId(resp.getScmId()).setRatisPeerRoles(resp.getPeerRolesList());
return builder.build();
}
Aggregations