Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1456

Provide builder for constructing instances of MiniDFSCluster

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.22.0
    • 0.22.0
    • test
    • None
    • Reviewed

    Description

      Time to fix a broken window. Of the 293 occurences of "new MiniDFSCluster("... most look something like:

      cluster = new MiniDFSCluster(0, config, numDatanodes, true, false, true,  null, null, null, null);

      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.

      Attachments

        1. HDFS-1456.patch
          10 kB
          Jakob Homan
        2. HDFS-1456-2.patch
          192 kB
          Jakob Homan
        3. HDFS-1456-for-1052-branch.patch
          191 kB
          Jakob Homan

        Activity

          People

            jghoman Jakob Homan
            jghoman Jakob Homan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: