[
https://issues.apache.org/jira/browse/HBASE-7533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556643#comment-13556643
]
Elliott Clark edited comment on HBASE-7533 at 1/17/13 10:05 PM:
----------------------------------------------------------------
bq.The region server will throw an actual exception wrapping the message which
will be understood by the ipc layer, or the region server does not throw the
exception, but set the exception message to the response?
I'm not sure I understand the question, so I might not answer the exact
question you're asking. However here's my thinking:
Right now the HRegionServer throws the exception and the ipc classes on the
server side catch the exception. This exception is currently a message
carrying two strings that're parsed on the client side.
I'm proposing a that exception is sent as bytes + name of the class to decode
these bytes. So a couple of examples:
# HRegionServer throws NoSuchColumFamilyException (could be any of the normal
non payload carrying exceptions)
# The ipc handler catches the exception.
# Sees that there's no registered way to serialize this specially.
# So the ipc handler would use the default StringBasedException.
# That pb would be built and the bytes array would be added to the response
along side the key that tells the client to decode on it's side using
StringBasedException.
# The client would then get the message.
# See there is an exception.
# look up how to decode it using exceptionMessageType.
# decode the bytes array and throw the exception
The special case:
# HRegionServer throws RegionMovedException
# The ipc classes catch the exception
# See that this is a specially registered class.
# Use the registered encode to take RegionMovedException and create
RegionMovedExceptionMessage.
# Build the message
# put the bytes into the exception field.
# put the key telling the client to decode this as RegionMovedExceptionMessage
into exceptionMessageType
# client would get the message
# see that there's an exception
# load the class the key says will decode the exception bytes.
# Use it to parse the RegionMovedExceptionMessage
# throw the exception on the client side.
Edit: Formatting.
was (Author: eclark):
bq.The region server will throw an actual exception wrapping the message
which will be understood by the ipc layer, or the region server does not throw
the exception, but set the exception message to the response?
I'm not sure I understand the question, so I might not answer the exact
question you're asking. However here's my thinking:
Right now the HRegionServer throws the exception and the ipc classes on the
server side catch the exception. This exception is currently a message
carrying two strings that're parsed on the client side.
I'm proposing a that exception is sent as bytes + name of the class to decode
these bytes. So a couple of examples:
# HRegionServer throws NoSuchColumFamilyException (could be any of the normal
non payload carrying exceptions)
# The ipc handler catches the exception. Sees that there's no registered way
to serialize this specially. So the ipc handler would use the default
StringBasedException. That pb would be built and the bytes array would be added
to the response along side the key that tells the client to decode on it's side
using StringBasedException.
# The client would then get the message.
# See there is an exception.
# look up how to decode it using exceptionMessageType.
# decode the bytes array and throw the exception
The special case:
# HRegionServer throws RegionMovedException
# The ipc classes catch the exception
# See that this is a specially registered class.
# Use the registered encode to take RegionMovedException and create
RegionMovedExceptionMessage.
# Build the message
# put the bytes into the exception field.
# put the key telling the client to decode this as RegionMovedExceptionMessage
into exceptionMessageType
# client would get the message
# see that there's an exception
# load the class the key says will decode the exception bytes.
# Use it to parse the RegionMovedExceptionMessage
# throw the exception on the client side.
> Write an RPC Specification for 0.96
> -----------------------------------
>
> Key: HBASE-7533
> URL: https://issues.apache.org/jira/browse/HBASE-7533
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: stack
> Fix For: 0.96.0
>
> Attachments: 7533_proto_sketch.txt
>
>
> RPC format is changing for 0.96 to accomodate our protobufing all around.
> Here is a first cut. Please shred:
> https://docs.google.com/document/d/1-1RJMLXzYldmHgKP7M7ynK6euRpucD03fZ603DlZfGI/edit
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira