Search in sources :

Example 1 with GetOnlineRegionRequest

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);
}
Also used : ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) GetOnlineRegionRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionRequest) GetOnlineRegionResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse)

Aggregations

GetOnlineRegionRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionRequest)1 GetOnlineRegionResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1