Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1456

Provide builder for constructing instances of MiniDFSCluster

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      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.

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

        Activity

          People

          • Assignee:
            Jakob Homan
            Reporter:
            Jakob Homan
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development