Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CF140105B9 for ; Thu, 25 Apr 2013 02:12:17 +0000 (UTC) Received: (qmail 8950 invoked by uid 500); 25 Apr 2013 02:12:17 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 8902 invoked by uid 500); 25 Apr 2013 02:12:17 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 8795 invoked by uid 99); 25 Apr 2013 02:12:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 02:12:17 +0000 Date: Thu, 25 Apr 2013 02:12:17 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9425) Add error codes to rpc-response 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/HADOOP-9425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13641307#comment-13641307 ] Tsz Wo (Nicholas), SZE commented on HADOOP-9425: ------------------------------------------------ Patch looks good. Some suggestions: - add the following methods to RpcServerException and override them in the subclasses. {code} public RpcStatusProto getRpcStatusProto() { return RpcStatusProto.ERROR; } public RpcErrorCodeProto getRpcErrorCodeProto() { return RpcErrorCodeProto.ERROR_APP; } {code} Then, use them in Server.Handler.run() {code} if (e instanceof RpcServerException) { RpcServerException rse = ((RpcServerException)e); returnStatus = rse.getRpcStatusProto(); detailedErr = rse.getRpcErrorCodeProto(); } else { returnStatus = RpcStatusProto.ERROR; detailedErr = RpcErrorCodeProto.ERROR_APP; } {code} - Suggestion on the names in RpcErrorCodeProto: -* ERROR_APP => ERROR_APPLICATION -* ERROR_RPC_ERROR_SERIALIZING_RESPONSE => ERROR_SERIALIZING_RESPONSE -* FATAL_UNK => FATAL_UNKNOWN -* FATAL_IPC_SERIALIZATION => FATAL_UNSUPPORTED_SERIALIZATION -* FATAL_DESERIALIZE_REQUEST => FATAL_DESERIALIZING_REQUEST -* FATAL_AUTH_FAILED => FATAL_UNAUTHORIZED > Add error codes to rpc-response > ------------------------------- > > Key: HADOOP-9425 > URL: https://issues.apache.org/jira/browse/HADOOP-9425 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Sanjay Radia > Assignee: Sanjay Radia > Attachments: HADOOP-9425-1.patch, HADOOP-9425-2.patch, HADOOP-9425-3.patch, HADOOP-9425-4.patch, HADOOP-9425-5.patch > > -- 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