use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.ServiceListRequest in project ozone by apache.
the class OzoneManagerProtocolClientSideTranslatorPB method getServiceInfo.
@Override
public ServiceInfoEx getServiceInfo() throws IOException {
ServiceListRequest req = ServiceListRequest.newBuilder().build();
OMRequest omRequest = createOMRequest(Type.ServiceList).setServiceListRequest(req).build();
final ServiceListResponse resp = handleError(submitRequest(omRequest)).getServiceListResponse();
return new ServiceInfoEx(resp.getServiceInfoList().stream().map(ServiceInfo::getFromProtobuf).collect(Collectors.toList()), resp.getCaCertificate(), resp.getCaCertsList());
}
use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.ServiceListRequest in project ozone by apache.
the class OzoneManagerProtocolClientSideTranslatorPB method getServiceList.
@Override
public List<ServiceInfo> getServiceList() throws IOException {
ServiceListRequest req = ServiceListRequest.newBuilder().build();
OMRequest omRequest = createOMRequest(Type.ServiceList).setServiceListRequest(req).build();
final ServiceListResponse resp = handleError(submitRequest(omRequest)).getServiceListResponse();
return resp.getServiceInfoList().stream().map(ServiceInfo::getFromProtobuf).collect(Collectors.toList());
}
Aggregations