use of org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionRequest in project hbase by apache.
the class ProtobufUtil method getOnlineRegions.
/**
* A helper to get the all the online regions on a region
* server using admin protocol.
* @return a list of online region info
*/
public static List<org.apache.hadoop.hbase.client.RegionInfo> getOnlineRegions(final RpcController controller, final AdminService.BlockingInterface admin) throws IOException {
GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
GetOnlineRegionResponse response = null;
try {
response = admin.getOnlineRegion(controller, request);
} catch (ServiceException se) {
throw getRemoteException(se);
}
return getRegionInfos(response);
}
Aggregations