You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by su...@apache.org on 2010/09/01 00:08:22 UTC

svn commit: r991360 [2/4] - in /hadoop/hdfs/branches/HDFS-1052: ./ src/c++/libhdfs/ src/contrib/hdfsproxy/ src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ src/contrib/thriftfs/src/java/org/apache/hadoop/thriftfs/ src/java/ src/java/org/apac...

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/UpgradeManagerNamenode.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/UpgradeManagerNamenode.java?rev=991360&r1=991359&r2=991360&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/UpgradeManagerNamenode.java (original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/UpgradeManagerNamenode.java Tue Aug 31 22:08:21 2010
@@ -72,10 +72,12 @@ class UpgradeManagerNamenode extends Upg
 
   synchronized UpgradeCommand processUpgradeCommand(UpgradeCommand command
                                                     ) throws IOException {
-    NameNode.LOG.debug("\n   Distributed upgrade for NameNode version " 
-        + getUpgradeVersion() + " to current LV " 
-        + FSConstants.LAYOUT_VERSION + " is processing upgrade command: "
-        + command.getAction() + " status = " + getUpgradeStatus() + "%");
+    if(NameNode.LOG.isDebugEnabled()) {
+      NameNode.LOG.debug("\n   Distributed upgrade for NameNode version " 
+          + getUpgradeVersion() + " to current LV " 
+          + FSConstants.LAYOUT_VERSION + " is processing upgrade command: "
+          + command.getAction() + " status = " + getUpgradeStatus() + "%");
+    }
     if(currentUpgrades == null) {
       NameNode.LOG.info("Ignoring upgrade command: " 
           + command.getAction() + " version " + command.getVersion()

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java?rev=991360&r1=991359&r2=991360&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java (original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/fi/ProbabilityModel.java Tue Aug 31 22:08:21 2010
@@ -95,7 +95,9 @@ public class ProbabilityModel {
 
     float ret = conf.getFloat(newProbName,
         conf.getFloat(ALL_PROBABILITIES, DEFAULT_PROB));
-    LOG.debug("Request for " + newProbName + " returns=" + ret);
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Request for " + newProbName + " returns=" + ret);
+    }
     // Make sure that probability level is valid.
     if (ret < DEFAULT_PROB || ret > MAX_PROB) 
       ret = conf.getFloat(ALL_PROBABILITIES, DEFAULT_PROB);

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/PipelinesTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/PipelinesTestUtil.java?rev=991360&r1=991359&r2=991360&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/PipelinesTestUtil.java (original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/PipelinesTestUtil.java Tue Aug 31 22:08:21 2010
@@ -67,8 +67,10 @@ public class PipelinesTestUtil extends D
           }
           assertTrue("FI: Wrong receiving length",
               counterPartsBytes <= n.bytes);
-          FiTestUtil.LOG.debug("FI: before compare of Recv bytes. Expected " +
-              n.bytes + ", got " + counterPartsBytes);
+          if(FiTestUtil.LOG.isDebugEnabled()) {
+            FiTestUtil.LOG.debug("FI: before compare of Recv bytes. Expected "
+                + n.bytes + ", got " + counterPartsBytes);
+          }
         }
       }
     }
@@ -104,8 +106,11 @@ public class PipelinesTestUtil extends D
           }
           assertTrue("FI: Wrong acknowledged length",
               counterPartsBytes == n.bytes);
-          FiTestUtil.LOG.debug("FI: before compare of Acked bytes. Expected " +
-              n.bytes + ", got " + counterPartsBytes);
+          if(FiTestUtil.LOG.isDebugEnabled()) {
+            FiTestUtil.LOG.debug(
+                "FI: before compare of Acked bytes. Expected " +
+                n.bytes + ", got " + counterPartsBytes);
+          }
         }
       }
     }

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/TestFiPipelines.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/TestFiPipelines.java?rev=991360&r1=991359&r2=991360&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/TestFiPipelines.java (original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/aop/org/apache/hadoop/hdfs/TestFiPipelines.java Tue Aug 31 22:08:21 2010
@@ -78,7 +78,9 @@ public class TestFiPipelines {
   @Test
   public void pipeline_04() throws IOException {
     final String METHOD_NAME = GenericTestUtils.getMethodName();
-    LOG.debug("Running " + METHOD_NAME);
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Running " + METHOD_NAME);
+    }
 
     final PipelinesTestUtil.PipelinesTest pipst =
       (PipelinesTestUtil.PipelinesTest) PipelinesTestUtil.initTest();
@@ -99,7 +101,9 @@ public class TestFiPipelines {
   @Test
   public void pipeline_05() throws IOException {
     final String METHOD_NAME = GenericTestUtils.getMethodName();
-    LOG.debug("Running " + METHOD_NAME);
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Running " + METHOD_NAME);
+    }
 
     final PipelinesTestUtil.PipelinesTest pipst =
       (PipelinesTestUtil.PipelinesTest) PipelinesTestUtil.initTest();
@@ -126,7 +130,9 @@ public class TestFiPipelines {
     final String METHOD_NAME = GenericTestUtils.getMethodName();
     final int MAX_PACKETS = 80;
     
-    LOG.debug("Running " + METHOD_NAME);
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Running " + METHOD_NAME);
+    }
 
     final PipelinesTestUtil.PipelinesTest pipst =
       (PipelinesTestUtil.PipelinesTest) PipelinesTestUtil.initTest();
@@ -148,13 +154,18 @@ public class TestFiPipelines {
       // The actual logic is expressed in DFSClient#computePacketChunkSize
       int bytesToSend = 700;
       while (cnt < 100 && pipst.getSuspend()) {
-        LOG.debug("_06(): " + cnt++ + " sending another " + bytesToSend + " bytes");
+        if(LOG.isDebugEnabled()) {
+          LOG.debug("_06(): " + cnt++ + " sending another " +
+              bytesToSend + " bytes");
+        }
         TestPipelines.writeData(fsOut, bytesToSend);
       }
     } catch (Exception e) {
       LOG.warn("Getting unexpected exception: ", e);
     }
-    LOG.debug("Last queued packet number " + pipst.getLastQueued());
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Last queued packet number " + pipst.getLastQueued());
+    }
     assertTrue("Shouldn't be able to send more than 81 packet", pipst.getLastQueued() <= 81);
   }
 
@@ -171,23 +182,32 @@ public class TestFiPipelines {
     @Override
     public void run() {
       while (!done) {
-        LOG.debug("_06: checking for the limit " + test.getLastQueued() + 
-            " and " + MAX);
+        if(LOG.isDebugEnabled()) {
+          LOG.debug("_06: checking for the limit " + test.getLastQueued() + 
+              " and " + MAX);
+        }
         if (test.getLastQueued() >= MAX) {
-          LOG.debug("FI: Resume packets acking");
+          if(LOG.isDebugEnabled()) {
+            LOG.debug("FI: Resume packets acking");
+          }
           test.setSuspend(false); //Do not suspend ack sending any more
           done = true;
         }
         if (!done)
           try {
-            LOG.debug("_06: MAX isn't reached yet. Current=" + test.getLastQueued());
+            if(LOG.isDebugEnabled()) {
+              LOG.debug("_06: MAX isn't reached yet. Current=" +
+                  test.getLastQueued());
+            }
             sleep(100);
           } catch (InterruptedException e) { }
       }
 
       assertTrue("Shouldn't be able to send more than 81 packet", test.getLastQueued() <= 81);
       try {
-        LOG.debug("_06: shutting down the cluster");
+        if(LOG.isDebugEnabled()) {
+          LOG.debug("_06: shutting down the cluster");
+        }
         // It has to be done like that, because local version of shutDownCluster()
         // won't work, because it tries to close an instance of FileSystem too.
         // Which is where the waiting is happening.
@@ -196,7 +216,9 @@ public class TestFiPipelines {
       } catch (Exception e) {
         e.printStackTrace();
       }
-      LOG.debug("End QueueChecker thread");
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("End QueueChecker thread");
+      }
     }
   }
   

Propchange: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 31 22:08:21 2010
@@ -2,4 +2,4 @@
 /hadoop/core/trunk/src/test/hdfs:776175-785643
 /hadoop/hdfs/branches/HDFS-265/src/test/hdfs:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/test/hdfs:820487
-/hadoop/hdfs/trunk/src/test/hdfs:987665-990214
+/hadoop/hdfs/trunk/src/test/hdfs:987665-991358