Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F6F6D8FA for ; Thu, 17 Jan 2013 22:26:14 +0000 (UTC) Received: (qmail 72735 invoked by uid 500); 17 Jan 2013 22:26:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 72682 invoked by uid 500); 17 Jan 2013 22:26:14 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 72615 invoked by uid 99); 17 Jan 2013 22:26:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 22:26:14 +0000 Date: Thu, 17 Jan 2013 22:26:14 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7533) Write an RPC Specification for 0.96 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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: {code} 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; } {code} 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