hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r644966 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/dfs/NNBench.java
Date Fri, 04 Apr 2008 22:30:38 GMT
Author: hairong
Date: Fri Apr  4 15:30:34 2008
New Revision: 644966

URL: http://svn.apache.org/viewvc?rev=644966&view=rev
Log:
HADOOP-3044. NNBench sets the right configuration for the mapper. Contributed by Hairong.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/dfs/NNBench.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=644966&r1=644965&r2=644966&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Apr  4 15:30:34 2008
@@ -505,6 +505,9 @@
     HADOOP-3050. DataNode sends one and only one block report after
     it registers with the namenode. (Hairong Kuang)
 
+    HADOOP-3044. NNBench sets the right configuration for the mapper.
+    (Hairong Kuang)
+
 Release 0.16.3 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/dfs/NNBench.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/dfs/NNBench.java?rev=644966&r1=644965&r2=644966&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/dfs/NNBench.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/dfs/NNBench.java Fri Apr  4 15:30:34 2008
@@ -613,10 +613,16 @@
      * Constructor
      */
     public NNBenchMapper() {
-      super(config);
+    }
+    
+    /**
+     * Mapper base implementation
+     */
+    public void configure(JobConf conf) {
+      setConf(conf);
       
       try {
-        filesystem = FileSystem.get(config);
+        filesystem = FileSystem.get(conf);
       } catch(Exception e) {
         throw new RuntimeException("Cannot get file system.", e);
       }
@@ -631,13 +637,6 @@
     /**
      * Mapper base implementation
      */
-    public void configure(JobConf conf) {
-      setConf(conf);
-    }
-    
-    /**
-     * Mapper base implementation
-     */
     public void close() throws IOException {
     }
     
@@ -648,8 +647,7 @@
     * synchronized nodes, to start at roughly the same time.
     */
     private boolean barrier() {
-      Configuration conf = filesystem.getConf();
-      long startTime = conf.getLong("test.nnbench.starttime", 0l);
+      long startTime = getConf().getLong("test.nnbench.starttime", 0l);
       long currentTime = System.currentTimeMillis();
       long sleepTime = startTime - currentTime;
       boolean retVal = false;



Mime
View raw message