hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9425) Add error codes to rpc-response
Date Thu, 25 Apr 2013 02:12:17 GMT

    [ 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

Mime
View raw message