|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.protobuf.ResponseConverter
@InterfaceAudience.Private public final class ResponseConverter
Helper utility to build protocol buffer responses, or retrieve data from protocol buffer responses.
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Method Summary | |
---|---|
static ClientProtos.ResultOrException.Builder |
buildActionResult(ClientProtos.Result r)
Wrap a throwable to an action result. |
static ClientProtos.ResultOrException.Builder |
buildActionResult(Throwable t)
Wrap a throwable to an action result. |
static MasterProtos.EnableCatalogJanitorResponse |
buildEnableCatalogJanitorResponse(boolean prevValue)
Creates a response for the catalog scan request |
static HBaseProtos.NameBytesPair |
buildException(Throwable t)
|
static RegionServerStatusProtos.GetLastFlushedSequenceIdResponse |
buildGetLastFlushedSequenceIdResponse(long seqId)
Creates a response for the last flushed sequence Id request |
static AdminProtos.GetOnlineRegionResponse |
buildGetOnlineRegionResponse(List<HRegionInfo> regions)
A utility to build a GetOnlineRegionResponse. |
static AdminProtos.GetServerInfoResponse |
buildGetServerInfoResponse(ServerName serverName,
int webuiPort)
A utility to build a GetServerInfoResponse. |
static AccessControlProtos.GetUserPermissionsResponse |
buildGetUserPermissionsResponse(List<UserPermission> permissions)
Converts the permissions list into a protocol buffer GetUserPermissionsResponse |
static MasterProtos.RunCatalogScanResponse |
buildRunCatalogScanResponse(int numCleaned)
Creates a response for the catalog scan request |
static List<HRegionInfo> |
getRegionInfos(AdminProtos.GetOnlineRegionResponse proto)
Get the list of region info from a GetOnlineRegionResponse |
static RegionOpeningState |
getRegionOpeningState(AdminProtos.OpenRegionResponse proto)
Get the region opening state from a OpenRegionResponse |
static List<RegionOpeningState> |
getRegionOpeningStateList(AdminProtos.OpenRegionResponse proto)
Get a list of region opening state from a OpenRegionResponse |
static byte[][] |
getRegions(AdminProtos.RollWALWriterResponse proto)
Get the list of regions to flush from a RollLogWriterResponse |
static Result[] |
getResults(CellScanner cellScanner,
ClientProtos.ScanResponse response)
Create Results from the cells using the cells meta data. |
static MultiResponse |
getResults(ClientProtos.MultiRequest request,
ClientProtos.MultiResponse response,
CellScanner cells)
Get the results from a protocol buffer MultiResponse |
static boolean |
isClosed(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Method Detail |
---|
public static MultiResponse getResults(ClientProtos.MultiRequest request, ClientProtos.MultiResponse response, CellScanner cells) throws IOException
request
- the protocol buffer MultiResponse to convertcells
- Cells to go with the passed in proto
. Can be null.
IOException
public static ClientProtos.ResultOrException.Builder buildActionResult(Throwable t)
t
-
public static ClientProtos.ResultOrException.Builder buildActionResult(ClientProtos.Result r)
r
-
public static HBaseProtos.NameBytesPair buildException(Throwable t)
t
-
public static AccessControlProtos.GetUserPermissionsResponse buildGetUserPermissionsResponse(List<UserPermission> permissions)
public static byte[][] getRegions(AdminProtos.RollWALWriterResponse proto)
proto
- the RollLogWriterResponse
public static List<HRegionInfo> getRegionInfos(AdminProtos.GetOnlineRegionResponse proto)
proto
- the GetOnlineRegionResponse
public static RegionOpeningState getRegionOpeningState(AdminProtos.OpenRegionResponse proto)
proto
- the OpenRegionResponse
public static List<RegionOpeningState> getRegionOpeningStateList(AdminProtos.OpenRegionResponse proto)
proto
- the OpenRegionResponse
public static boolean isClosed(AdminProtos.CloseRegionResponse proto)
proto
- the CloseRegionResponse
public static AdminProtos.GetServerInfoResponse buildGetServerInfoResponse(ServerName serverName, int webuiPort)
serverName
- webuiPort
-
public static AdminProtos.GetOnlineRegionResponse buildGetOnlineRegionResponse(List<HRegionInfo> regions)
regions
-
public static MasterProtos.RunCatalogScanResponse buildRunCatalogScanResponse(int numCleaned)
public static MasterProtos.EnableCatalogJanitorResponse buildEnableCatalogJanitorResponse(boolean prevValue)
public static RegionServerStatusProtos.GetLastFlushedSequenceIdResponse buildGetLastFlushedSequenceIdResponse(long seqId)
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 encounteredpublic static Result[] getResults(CellScanner cellScanner, ClientProtos.ScanResponse response) throws IOException
cellScanner
- response
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |