hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r564713 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Fri, 10 Aug 2007 18:31:48 GMT
Author: dhruba
Date: Fri Aug 10 11:31:47 2007
New Revision: 564713

URL: http://svn.apache.org/viewvc?view=rev&rev=564713
Log:
HADOOP-1680.  Improvements to Block CRC upgrade messages.
(Raghu Angadi via dhruba)
merge -c 564710 from trunk to 0.14 branch.


Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=564713&r1=564712&r2=564713
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Fri Aug 10 11:31:47 2007
@@ -460,6 +460,9 @@
 147. HADOOP-1654.  Remove performance regression introduced by Block CRC.
      (Raghu Angadi via dhruba)
 
+148. HADOOP-1680.  Improvements to Block CRC upgrade messages.
+     (Raghu Angadi via dhruba)
+
 Release 0.13.0 - 2007-06-08
 
  1. HADOOP-1047.  Fix TestReplication to succeed more reliably.

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java?view=diff&rev=564713&r1=564712&r2=564713
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/BlockCrcUpgrade.java
Fri Aug 10 11:31:47 2007
@@ -135,7 +135,7 @@
   
   /** Returns string that has block id and the associated file */
   public String toString() {
-    return block + " (file: " +
+    return block + " (filename: " +
            ( (crcInfo == null || crcInfo.fileName == null) ? 
              "Unknown" : crcInfo.fileName ) + ")";
   }
@@ -650,8 +650,9 @@
           
           info.numMatches++;
           if (info.numMatches >= (replication/2 + replication%2)) {
-            LOG.info("readCrcBuf: " + info.numMatches + 
-                     " out of " + replication + " matched for " + blockInfo);
+            LOG.info("At least " + info.numMatches + 
+                     " of the " + replication + 
+                     " replicated CRC files agree for " + blockInfo);
             return buf;
           }
 
@@ -670,9 +671,11 @@
      * absolute majority.
      * Try to pick the buffer that that has max number of matches.
      */
+    int replicasFetched = 0;
     CrcBufInfo selectedBuf = null;
     for (int i=0; i<numBufs; i++) {
       CrcBufInfo info = bufInfoArr[i];
+      replicasFetched += info.numMatches;
       if (selectedBuf == null || selectedBuf.numMatches < info.numMatches) {
         selectedBuf = info;
       }
@@ -682,8 +685,8 @@
       throw new IOException("Could not fetch any crc data for " + block);
     }
 
-    LOG.info("readCrcBuf: " + selectedBuf.numMatches + 
-             " out of " + replication + " matched for " + blockInfo);
+    LOG.info(selectedBuf.numMatches + " of the " + replicasFetched + 
+             " CRC replicas fetched agree for " + blockInfo);
     
     //Print a warning if numMatches is 1?
     return  selectedBuf.buf;      
@@ -926,7 +929,7 @@
     
     for (DatanodeInfo dnInfo : dnArr) {
       if ( dnInfo.getName().equals(myName) ) {
-        LOG.info("XXX skipping crcInfo fetch from " + dnInfo.getName());
+        LOG.info("skipping crcInfo fetch from " + dnInfo.getName());
       } else {
         try {
           byte[] crcBuf = readCrcFromReplica(blockInfo, dnInfo, checksumArr);
@@ -1816,15 +1819,15 @@
     
     avgDatanodeCompletionPct = totalCompletion/(dnMap.size() + 1e-20);
     
-    String msg = "Avg completion on Datanodes: " +              
+    String msg = "Avg completion of all Datanodes: " +              
                  String.format("%.2f%%", avgDatanodeCompletionPct) +
                  " with " + errors + " errors. " +
                  ((unfinishedDnMap.size() > 0) ? spacing + 
                    unfinishedDnMap.size() + " out of " + dnMap.size() +
                    " nodes are not done." : "");
                  
-    LOG.info("Upgrade " + (isUpgradeDone() ? 
-             "completed. " : "still running. ") + spacing + msg);
+    LOG.info("Block CRC Upgrade is " + (isUpgradeDone() ? 
+             "complete. " : "still running. ") + spacing + msg);
     return msg;
   }
   
@@ -1849,8 +1852,8 @@
         inactivityExtension) || forceDnCompletion ;
                  
       if ( datanodesDone ) {
-        LOG.info(((forceDnCompletion) ? "Forcing " : "Marking ") +
-                 "Datanode Upgrade done");
+        LOG.info("Upgrade of DataNode blocks is complete. " +
+                 ((forceDnCompletion) ? "(ForceDnCompletion is on.)" : ""));
         upgradeStatus = UpgradeStatus.DATANODES_DONE;
       }
     }
@@ -2081,9 +2084,9 @@
      * if fname exists in the directory.
      */
     while (true) {
-      LOG.info("Deleting \".crc\" files. This can take few minutes ... ");
+      LOG.info("Deleting \".crc\" files. This may take a few minutes ... ");
       int numFilesDeleted = deleteCrcFiles("/");
-      LOG.info("Deleted " + numFilesDeleted + " files");
+      LOG.info("Deleted " + numFilesDeleted + " \".crc\" files");
       break;
       // Should we iterate again? No need for now!
     }

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=564713&r1=564712&r2=564713
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSNamesystem.java Fri
Aug 10 11:31:47 2007
@@ -3353,7 +3353,8 @@
     String getTurnOffTip() {
       return (isManual() ?  getDistributedUpgradeState() ?
         "Safe mode will be turned off automatically upon completion of " + 
-        "the distributed upgrade: status = " + getDistributedUpgradeStatus() + "%" :
+        "the distributed upgrade: upgrade progress = " + 
+        getDistributedUpgradeStatus() + "%" :
         "Use \"hadoop dfs -safemode leave\" to turn safe mode off." :
         "Safe mode will be turned off automatically.");
     }



Mime
View raw message