hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7533) Write an RPC Specification for 0.96
Date Thu, 17 Jan 2013 22:26:14 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556663#comment-13556663

Enis Soztutar commented on HBASE-7533:

bq. I'm not sure I understand the question, so I might not answer the exact question you're
asking. However here's my thinking:
Thanks, I was asking about how are we going to pass the exception from the region server layer
to the ipc layer without breaking layering. Not sure registering serializers for exceptions
is the cleanest way though. 
I think what DD was talking about above, was something like this: 
class PBException extends Exception { 
Message message;
PBException(Message message) {this.message = message;}
class RegionMovedException extends PBException {
   RegionMovedException(RegionMovedData message) {super(message);} // ctor from server side
   RegionMovedException(byte[] bytes) {} // ctor from server side   
message RegionMovedData {
  required ServerName serverName = 1;

The flow would be:
1. HRegionServer throws RegionMovedException
2. The ipc classes catch the exception
3. Checks exception is instanceof PBException. --> ipc knows about PBException
4. Constructs the exceptionBody bytes by serializing ex.message
5. put the bytes into the exception field.
6. put the class name "RegionMovedException" as exception class name
7. client would get the message
8. see that there's an exception
9. Instantiate and throw the exception class (RegionMovedException) by using the byte[] ctor,
which would decode this as RegionMovedData

> 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_spec.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

View raw message