Hadoop Common
  1. Hadoop Common
  2. HADOOP-5164

Subclasses of ClusterMapReduceTestCase can't easily add new configuration parameters

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      Hide
      Modified the behavior of ClusterMapReduceTestCase so that setupCluster() is no longer called automatically in TestCase.setUp(). Now, you must explicitly call setupCluster() for each test you wish to run (or you can share a single cluster among several tests).
      Show
      Modified the behavior of ClusterMapReduceTestCase so that setupCluster() is no longer called automatically in TestCase.setUp(). Now, you must explicitly call setupCluster() for each test you wish to run (or you can share a single cluster among several tests).

      Description

      Currently there is not a clean way for subclasses of ClusterMapReduceTestCase to add to the JobConf used to start the cluster daemons.

      The startCluster() method does take a Properties object that is added to the JobConf used to the start the daemons. However, startCluster() is called from JUnit inside the setUp() method, which sets this parameter to be null.

      If you try to override setUp() in a subclass of ClusterMapReduceTestCase, then you won't be able to invoke the TestCase.setUp() ancestor without calling ClusterMapReduceTestCase's setUp() (which will pass in the null parameter). On the other hand, if you just call startCluster() within your test method, then you would be starting up a cluster that was already started.

      1. HADOOP-5164.1.patch
        6 kB
        George Porter
      2. HADOOP-5164.2.patch
        7 kB
        George Porter
      3. HADOOP-5164.patch
        1.0 kB
        George Porter

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            George Porter
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development