From 2a49e1a3a44c8b428ec5ea1b7f4c3c11c75e2292 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Mon, 18 Jul 2011 17:27:37 +0000 Subject: [PATCH] MAPREDUCE-2623. Update ClusterMapReduceTestCase to use MiniDFSCluster.Builder. Contributed by Harsh J Chouraria git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1147981 13f79535-47bb-0310-9956-ffa450edef68 --- mapreduce/CHANGES.txt | 3 +++ .../org/apache/hadoop/mapred/ClusterMapReduceTestCase.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mapreduce/CHANGES.txt b/mapreduce/CHANGES.txt index 7b91e48b35..440b21ece0 100644 --- a/mapreduce/CHANGES.txt +++ b/mapreduce/CHANGES.txt @@ -200,6 +200,9 @@ Trunk (unreleased changes) MAPREDUCE-2249. Check the reflexive property of Counters objects when comparing equality. (Devaraj K via todd) + MAPREDUCE-2623. Update ClusterMapReduceTestCase to use + MiniDFSCluster.Builder (Harsh J Chouraria via eli) + OPTIMIZATIONS MAPREDUCE-2026. Make JobTracker.getJobCounters() and diff --git a/mapreduce/src/test/mapred/org/apache/hadoop/mapred/ClusterMapReduceTestCase.java b/mapreduce/src/test/mapred/org/apache/hadoop/mapred/ClusterMapReduceTestCase.java index 057982de7b..56f0ef6f9c 100644 --- a/mapreduce/src/test/mapred/org/apache/hadoop/mapred/ClusterMapReduceTestCase.java +++ b/mapreduce/src/test/mapred/org/apache/hadoop/mapred/ClusterMapReduceTestCase.java @@ -78,7 +78,8 @@ protected synchronized void startCluster(boolean reformatDFS, Properties props) conf.set((String) entry.getKey(), (String) entry.getValue()); } } - dfsCluster = new MiniDFSCluster(conf, 2, reformatDFS, null); + dfsCluster = new MiniDFSCluster.Builder(conf).numDataNodes(2) + .format(reformatDFS).racks(null).build(); ConfigurableMiniMRCluster.setConfiguration(props); //noinspection deprecation