@InterfaceAudience.Private public final class ResponseConverter extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ResultOrException.Builder |
buildActionResult(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Result r)
Wrap a throwable to an action result.
|
static org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ResultOrException.Builder |
buildActionResult(Throwable t)
Wrap a throwable to an action result.
|
static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableCatalogJanitorResponse |
buildEnableCatalogJanitorResponse(boolean prevValue)
Creates a response for the catalog scan request
|
static org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.NameBytesPair |
buildException(Throwable t) |
static org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.GetLastFlushedSequenceIdResponse |
buildGetLastFlushedSequenceIdResponse(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds ids)
Creates a response for the last flushed sequence Id request
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetOnlineRegionResponse |
buildGetOnlineRegionResponse(List<HRegionInfo> regions)
A utility to build a GetOnlineRegionResponse.
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetServerInfoResponse |
buildGetServerInfoResponse(ServerName serverName,
int webuiPort)
A utility to build a GetServerInfoResponse.
|
static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GetUserPermissionsResponse |
buildGetUserPermissionsResponse(List<UserPermission> permissions)
Converts the permissions list into a protocol buffer GetUserPermissionsResponse
|
static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.RunCatalogScanResponse |
buildRunCatalogScanResponse(int numCleaned)
Creates a response for the catalog scan request
|
static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.RunCleanerChoreResponse |
buildRunCleanerChoreResponse(boolean ran)
Creates a response for the cleaner chore request
|
static IOException |
getControllerException(com.google.protobuf.RpcController controller)
Retreivies exception stored during RPC invocation.
|
static List<HRegionInfo> |
getRegionInfos(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetOnlineRegionResponse proto)
Get the list of region info from a GetOnlineRegionResponse
|
static RegionOpeningState |
getRegionOpeningState(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionResponse proto)
Get the region opening state from a OpenRegionResponse
|
static List<RegionOpeningState> |
getRegionOpeningStateList(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionResponse proto)
Get a list of region opening state from a OpenRegionResponse
|
static Result[] |
getResults(CellScanner cellScanner,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanResponse response)
Create Results from the cells using the cells meta data.
|
static MultiResponse |
getResults(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiRequest request,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiResponse response,
CellScanner cells)
Get the results from a protocol buffer MultiResponse
|
static MultiResponse |
getResults(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiRequest request,
Map<Integer,Integer> rowMutationsIndexMap,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiResponse response,
CellScanner cells)
Get the results from a protocol buffer MultiResponse
|
static Map<String,Long> |
getScanMetrics(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanResponse response) |
static boolean |
isClosed(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionResponse proto)
Check if the region is closed from a CloseRegionResponse
|
static void |
setControllerException(com.google.protobuf.RpcController controller,
IOException ioe)
Stores an exception encountered during RPC invocation so it can be passed back
through to the client.
|
public static MultiResponse getResults(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiRequest request, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiResponse response, CellScanner cells) throws IOException
request
- the original protocol buffer MultiRequestresponse
- the protocol buffer MultiResponse to convertcells
- Cells to go with the passed in proto
. Can be null.IOException
public static MultiResponse getResults(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiRequest request, Map<Integer,Integer> rowMutationsIndexMap, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MultiResponse response, CellScanner cells) throws IOException
request
- the original protocol buffer MultiRequestrowMutationsIndexMap
- response
- the protocol buffer MultiResponse to convertcells
- Cells to go with the passed in proto
. Can be null.IOException
public static org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ResultOrException.Builder buildActionResult(Throwable t)
t
- public static org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ResultOrException.Builder buildActionResult(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Result r)
r
- public static org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.NameBytesPair buildException(Throwable t)
t
- public static org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GetUserPermissionsResponse buildGetUserPermissionsResponse(List<UserPermission> permissions)
public static List<HRegionInfo> getRegionInfos(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetOnlineRegionResponse proto)
proto
- the GetOnlineRegionResponsepublic static RegionOpeningState getRegionOpeningState(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionResponse proto)
proto
- the OpenRegionResponsepublic static List<RegionOpeningState> getRegionOpeningStateList(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionResponse proto)
proto
- the OpenRegionResponsepublic static boolean isClosed(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionResponse proto)
proto
- the CloseRegionResponsepublic static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetServerInfoResponse buildGetServerInfoResponse(ServerName serverName, int webuiPort)
serverName
- webuiPort
- public static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetOnlineRegionResponse buildGetOnlineRegionResponse(List<HRegionInfo> regions)
regions
- public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.RunCatalogScanResponse buildRunCatalogScanResponse(int numCleaned)
public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableCatalogJanitorResponse buildEnableCatalogJanitorResponse(boolean prevValue)
public static org.apache.hadoop.hbase.protobuf.generated.MasterProtos.RunCleanerChoreResponse buildRunCleanerChoreResponse(boolean ran)
public static org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.GetLastFlushedSequenceIdResponse buildGetLastFlushedSequenceIdResponse(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds ids)
public static void setControllerException(com.google.protobuf.RpcController controller, IOException ioe)
controller
- the controller instance provided by the client when calling the serviceioe
- the exception encountered@Nullable public static IOException getControllerException(com.google.protobuf.RpcController controller) throws IOException
controller
- the controller instance provided by the client when calling the serviceIOException
public static Result[] getResults(CellScanner cellScanner, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanResponse response) throws IOException
cellScanner
- response
- IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.