[
https://issues.apache.org/jira/browse/HBASE-7533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13555807#comment-13555807
]
Enis Soztutar commented on HBASE-7533:
--------------------------------------
For HBASE-7268, I was going over the changes in RegionMovedException, and
realized that, for some class of exceptions (RegionMoved, RegionOffline, etc),
we have to carry some data over the wire to the client side which should be
PB'ed as well. Right now, we are sending the stack trace over, and from the
client side, parsing the stack trace. i guess this is not handled at the
attached spec as well.
Thinking about the problem with Sergey and DD, we realized that there are
mainly two classes of exceptions that we can throw. RegionMovedException, and
the like are different from KeeperException, etc, in the sense that they are
expected return values for some rpc calls, like put, and they carry data.
In the end, I think we have to be able to define PB messages for some
exceptions:
{code}
message RegionMovedException{
required ServerName serverName = 1;
optional int64 openSeqNum = 2;
}
{code}.
Now given that, I think we can do the enum approach of enumerating all
exception messages in RpcException, and have the ipc layer from the client side
construct the actual exception class with passing the Message to the exception
c.tor. We can have a superclass like, PBException extends Exception containing
a Message, and RegionMovedException extends PBException. The ipc layer from the
server side, will know about PBException, and will pass the serialized bytes.
Alternatively, we can try to embed the exception that the client knows about
(RegionMovedException) to the actual response messages, as valid messages. The
region server code in this case for example, will not throw an exception, but
instead, but the exception data in the response, and pass to rpc layer. The
actual RPC response will be SUCCESS, not ERROR, but the client can inspect the
response data, and see that exception (and maybe construct and throw an actual
exception).
> 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