hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13146) Refactor RetryInvocationHandler
Date Mon, 16 May 2016 18:51:12 GMT

    [ 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message