hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Boudnik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-1456) Provide builder for constructing instances of MiniDFSCluster
Date Fri, 15 Oct 2010 22:00:42 GMT

    [ https://issues.apache.org/jira/browse/HDFS-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921570#action_12921570
] 

Konstantin Boudnik commented on HDFS-1456:
------------------------------------------

At first I was about to suggest to name setters more traditionally but then I absolutely liked
the 
{noformat}
      cluster = new MiniDFSCluster.Builder(config)
                                  .manageDataDfsDirs(false)
                                  .manageNameDfsDirs(false).build();
{noformat}

+1 on the patch.

> Provide builder for constructing instances of MiniDFSCluster
> ------------------------------------------------------------
>
>                 Key: HDFS-1456
>                 URL: https://issues.apache.org/jira/browse/HDFS-1456
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 0.22.0
>            Reporter: Jakob Homan
>            Assignee: Jakob Homan
>             Fix For: 0.22.0
>
>         Attachments: HDFS-1456.patch
>
>
> Time to fix a broken window. Of the 293 occurences of "new MiniDFSCluster("... most look
something like:
> {noformat}cluster = new MiniDFSCluster(0, config, numDatanodes, true, false, true,  null,
null, null, null);{noformat}
> The largest constructor takes 10 parameters, and even the overloaded constructors can
be difficult to read as their mainaly nulls or booleans.
> We should provide a Builder for constructing MiniDFSClusters to improve readability.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message