[
https://issues.apache.org/jira/browse/HADOOP-13146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15285063#comment-15285063
]
Jing Zhao commented on HADOOP-13146:
------------------------------------
Thanks for the refactoring, Nicholas! The patch looks pretty good to me. Just
two minor comments:
# We can use {{Collections.singletonList}} instead of {{Arrays.asList}} in the
following code.
{code}
117 final Iterable<Exception> exceptions = e instanceof
MultiException ?
118 ((MultiException) e).getExceptions().values() :
Arrays.asList(e);
{code}
# The follow java comment can be moved into the {{failover}} method.
{code}
// Make sure that concurrent failed method invocations only cause a
// single actual fail over.
{code}
+1 after addressing the comments.
> Refactor RetryInvocationHandler
> -------------------------------
>
> Key: HADOOP-13146
> URL: https://issues.apache.org/jira/browse/HADOOP-13146
> Project: Hadoop Common
> Issue Type: Improvement
> Components: io
> Reporter: Tsz Wo Nicholas Sze
> Assignee: Tsz Wo Nicholas Sze
> Priority: Minor
> Attachments: c13146_20160513.patch, c13146_20160513b.patch,
> c13146_20160514.patch, c13146_20160514b.patch
>
>
> - The exception handling is quite long. It is better to refactor it to a
> separated method.
> - The failover logic and synchronization can be moved to a new inner class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]