use of org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetSafeModeRuleStatusesRequestProto in project ozone by apache.
the class StorageContainerLocationProtocolClientSideTranslatorPB method getSafeModeRuleStatuses.
@Override
public Map<String, Pair<Boolean, String>> getSafeModeRuleStatuses() throws IOException {
GetSafeModeRuleStatusesRequestProto request = GetSafeModeRuleStatusesRequestProto.getDefaultInstance();
GetSafeModeRuleStatusesResponseProto response = submitRequest(Type.GetSafeModeRuleStatuses, builder -> builder.setGetSafeModeRuleStatusesRequest(request)).getGetSafeModeRuleStatusesResponse();
Map<String, Pair<Boolean, String>> map = new HashMap();
for (SafeModeRuleStatusProto statusProto : response.getSafeModeRuleStatusesProtoList()) {
map.put(statusProto.getRuleName(), Pair.of(statusProto.getValidate(), statusProto.getStatusText()));
}
return map;
}
Aggregations