[
https://issues.apache.org/jira/browse/HADOOP-8202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236948#comment-13236948
]
Suresh Srinivas commented on HADOOP-8202:
-----------------------------------------
bq. "c = (Closeable) Proxy.getInvocationHandler(proxy);" - this could
potentially cause an uncaught ClassCastException, if the InvocationHandler
itself doesn't implement Closeable.
Not necessary - all invocation handlers in Hadoop are RpcInvocationHandlers and
they implement Closeable.
bq. Seems like it shouldn't be too tough to write a test for this with some
mock objects.
I think this seems wholly unnecessary. Currently stopProxy is completely
failing. I know that multiple times things have changed in this part of the
code, and has been broken for some time.
I am +1 without any tests.
bq. Rather than have a single catch-all error message at the bottom, and return
early to avoid it, I think it'd be better to only ever log a single error, and
include the relevant information which caused the failure to close the proxy in
that log message.
This is your coding style. I am not sure if it should be followed by every one.
Again, I am okay to commit this, once we have log statement from the existing
test.
> stopproxy() is not closing the proxies correctly
> ------------------------------------------------
>
> Key: HADOOP-8202
> URL: https://issues.apache.org/jira/browse/HADOOP-8202
> Project: Hadoop Common
> Issue Type: Bug
> Components: ipc
> Affects Versions: 0.24.0
> Reporter: Hari Mankude
> Assignee: Hari Mankude
> Priority: Minor
> Attachments: HADOOP-8202.patch, HADOOP-8202.patch
>
>
> I was running testbackupnode and noticed that NNprotocol proxy was not being
> closed. Talked with Suresh and he observed that most of the protocols do not
> implement ProtocolTranslator and hence the logic in stopproxy() does not
> work. Instead, since all of them are closeable, Suresh suggested that
> closeable property should be used at close.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira