hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-1456) Provide builder for constructing instances of MiniDFSCluster
Date Sun, 17 Oct 2010 19:59:23 GMT

     [ https://issues.apache.org/jira/browse/HDFS-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jakob Homan updated HDFS-1456:
------------------------------

    Attachment: HDFS-1456-2.patch

Here's a patch with a slightly refined builder and all the calls to the MiniDFSCluster constructors
replaced with calls to the builder.  Most of the refactoring was automatic since most of the
calls to the MiniDFS follow a standard pattern.  I noted that quite a large percentage of
the calls weren't using the most efficient constructor available.  This is a lot of code churn,
but as they stands, the MiniDFSCluster constructors are so hideous, I think it's worth the
change to get rid of them.
All the tests pass, although TestBlockRecovery, TestBlockTokenWithDFS and TestPipelines are
all pretty flaky both on OSX and Ubuntu.
Test-patch:
{noformat}     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 424 new or modified tests.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler
warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 release audit.  The applied patch does not increase the total number of
release audit warnings.
     [exec] 
     [exec]     +1 system tests framework.  The patch passed system tests framework compile.
{noformat}

> 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-2.patch, 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