hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgho...@apache.org
Subject svn commit: r937691 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java
Date Sat, 24 Apr 2010 20:30:51 GMT
Author: jghoman
Date: Sat Apr 24 20:30:51 2010
New Revision: 937691

URL: http://svn.apache.org/viewvc?rev=937691&view=rev
Log:
HDFS-1092. Use logging rather than System.err in MiniDFSCluster. (Kay Kay via jghoman)

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=937691&r1=937690&r2=937691&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Sat Apr 24 20:30:51 2010
@@ -142,6 +142,9 @@ Trunk (unreleased changes)
 
     HDFS-1099. Add test for umask backward compatibility. (suresh)
 
+    HDFS-1092. Use logging rather than System.err in MiniDFSCluster.
+    (Kay Kay via jghoman)
+
   OPTIMIZATIONS
 
     HDFS-946. NameNode should not return full path name when lisitng a

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java?rev=937691&r1=937690&r2=937691&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java (original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java Sat Apr 24
20:30:51 2010
@@ -28,6 +28,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Random;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
@@ -75,6 +77,8 @@ public class MiniDFSCluster {
       this.dnArgs = args;
     }
   }
+  private static final Log LOG = LogFactory.getLog(MiniDFSCluster.class);
+
   private URI myUri = null;
   private Configuration conf;
   private NameNode nameNode;
@@ -346,7 +350,7 @@ public class MiniDFSCluster {
     if (numDataNodes > 0) {
       while (!isClusterUp()) {
         try {
-          System.err.println("Waiting for the Mini HDFS Cluster to start...");
+          LOG.warn("Waiting for the Mini HDFS Cluster to start...");
           Thread.sleep(1000);
         } catch (InterruptedException e) {
         }
@@ -628,7 +632,7 @@ public class MiniDFSCluster {
    */
   public void shutdownDataNodes() {
     for (int i = dataNodes.size()-1; i >= 0; i--) {
-      System.out.println("Shutting down DataNode " + i);
+      LOG.info("Shutting down DataNode " + i);
       DataNode dn = dataNodes.remove(i).datanode;
       dn.shutdown();
       numDataNodes--;



Mime
View raw message