[ 
https://issues.apache.org/jira/browse/HADOOP-7607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107160#comment-13107160
 ] 

Uma Maheswara Rao G commented on HADOOP-7607:
---------------------------------------------

Hi Aaron,

{code}
    } else {
+      LOG.error("Could not get invocation handler " + invocationHandler +
+          " for proxy " + proxy + ", or invocation handler is not closeable.");
     }
{code}

 I think printing proxy may create problem.If invocationHandler is non 
Closeable and has valid proxy, it may throw NoSuchMethodException.
 
 I just removed closeable from RetryInvocationHandler and ran some tests. Since 
it will invoke toString on proxy obj, it started throwing NoSuchMethodException.


Caused by: java.lang.NoSuchMethodException: 
org.apache.hadoop.hdfs.protocol.ClientProtocol.toString()
        at java.lang.Class.getMethod(Unknown Source)
        at 
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:70)
        ... 37 more


I think we can just change this message to like below

LOG.error("Could not get invocation handler " + invocationHandler +
          " for proxy " + proxy.getClass() + ", or invocation handler is not 
closeable.");


am i missing something here?

Thanks,
Uma



 


> Simplify the RPC proxy cleanup process
> --------------------------------------
>
>                 Key: HADOOP-7607
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7607
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.24.0
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>             Fix For: 0.24.0
>
>         Attachments: hadoop-7607.0.patch, hadoop-7607.1.patch
>
>
> The process to clean up an RPC proxy object is to call RPC.stopProxy, which 
> looks up the RPCEngine previously associated with the interface which that 
> proxy object provides and calls RPCEngine.stopProxy passing in the proxy 
> object. Every concrete implementation of RPCEngine.stopProxy then looks up 
> the invocation handler associated with the proxy object and calls close() on 
> that invocation handler.
> This process can be simplified by cutting out the steps of looking up the 
> previously-registered RPCEngine, and instead just having RPC.stopProxy 
> directly look up the invocation handler for the proxy object and call close() 
> on it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to