|
||||||||||
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.
Method Summary | |
---|---|
static ClientProtos.ActionResult |
buildActionResult(Throwable t)
Wrap a throwable to an action result. |
static MasterAdminProtos.CatalogScanResponse |
buildCatalogScanResponse(int numCleaned)
Creates a response for the catalog scan request |
static MasterAdminProtos.EnableCatalogJanitorResponse |
buildEnableCatalogJanitorResponse(boolean prevValue)
Creates a response for the catalog scan request |
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.UserPermissionsResponse |
buildUserPermissionsResponse(List<UserPermission> permissions)
Converts the permissions list into a protocol buffer UserPermissionsResponse |
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 List<Object> |
getResults(ClientProtos.MultiResponse proto,
CellScanner cells)
Get the results from a protocol buffer MultiResponse |
static Result[] |
getResults(ClientProtos.ScanResponse response)
Get the client Results from a protocol buffer ScanResponse |
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 |
Method Detail |
---|
public static Result[] getResults(ClientProtos.ScanResponse response)
response
- the protocol buffer ScanResponse
public static List<Object> getResults(ClientProtos.MultiResponse proto, CellScanner cells) throws IOException
proto
- the protocol buffer MultiResponse to convertcells
- Cells to go with the passed in proto
. Can be null.
IOException
public static ClientProtos.ActionResult buildActionResult(Throwable t)
t
-
public static AccessControlProtos.UserPermissionsResponse buildUserPermissionsResponse(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 MasterAdminProtos.CatalogScanResponse buildCatalogScanResponse(int numCleaned)
public static MasterAdminProtos.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 encountered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |