hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077014 - in /hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode: BlockReceiver.java BlockSender.java DataNode.java DataXceiver.java
Date Fri, 04 Mar 2011 03:30:25 GMT
Author: omalley
Date: Fri Mar  4 03:30:25 2011
New Revision: 1077014

URL: http://svn.apache.org/viewvc?rev=1077014&view=rev
Log:
commit 69df83591097762e01489fa984dff756972cf2ca
Author: Jakob Homan <jhoman@yahoo-inc.com>
Date:   Wed Oct 14 11:10:19 2009 -0700

    HADOOP:5222 from http://issues.apache.org/jira/secure/attachment/12400340/clienttrace-1.patch
    
    +++ b/YAHOO-CHANGES.txt
    +63. HADOOP-5222. Add offset to datanode clienttrace. (Lei Xu via cdouglas)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java?rev=1077014&r1=1077013&r2=1077014&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
Fri Mar  4 03:30:25 2011
@@ -801,9 +801,10 @@ class BlockReceiver implements java.io.C
                     DataNode.EMPTY_DEL_HINT);
                 if (ClientTraceLog.isInfoEnabled() &&
                     receiver.clientName.length() > 0) {
+                  long offset = 0;
                   ClientTraceLog.info(String.format(DN_CLIENTTRACE_FORMAT,
-                        receiver.inAddr, receiver.myAddr, block.getNumBytes(),
-                        "HDFS_WRITE", receiver.clientName,
+                        receiver.inAddr, receiver.myAddr, block.getNumBytes(), 
+                        "HDFS_WRITE", receiver.clientName, offset,
                         datanode.dnRegistration.getStorageID(), block));
                 } else {
                   LOG.info("Received block " + block + 
@@ -924,9 +925,10 @@ class BlockReceiver implements java.io.C
                   DataNode.EMPTY_DEL_HINT);
               if (ClientTraceLog.isInfoEnabled() &&
                   receiver.clientName.length() > 0) {
+                long offset = 0;
                 ClientTraceLog.info(String.format(DN_CLIENTTRACE_FORMAT,
-                      receiver.inAddr, receiver.myAddr, block.getNumBytes(),
-                      "HDFS_WRITE", receiver.clientName,
+                      receiver.inAddr, receiver.myAddr, block.getNumBytes(), 
+                      "HDFS_WRITE", receiver.clientName, offset, 
                       datanode.dnRegistration.getStorageID(), block));
               } else {
                 LOG.info("Received block " + block + 

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java?rev=1077014&r1=1077013&r2=1077014&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
Fri Mar  4 03:30:25 2011
@@ -412,7 +412,7 @@ class BlockSender implements java.io.Clo
       }
     } finally {
       if (clientTraceFmt != null) {
-        ClientTraceLog.info(String.format(clientTraceFmt, totalRead));
+        ClientTraceLog.info(String.format(clientTraceFmt, totalRead, initialOffset));
       }
       close();
     }

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java?rev=1077014&r1=1077013&r2=1077014&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Fri Mar  4 03:30:25 2011
@@ -139,6 +139,7 @@ public class DataNode extends Configured
         ", bytes: %s" +  // byte count
         ", op: %s" +     // operation
         ", cliID: %s" +  // DFSClient id
+        ", offset: %s" + // offset
         ", srvID: %s" +  // DatanodeRegistration
         ", blockid: %s"; // block id
   static final Log ClientTraceLog =

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java?rev=1077014&r1=1077013&r2=1077014&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
Fri Mar  4 03:30:25 2011
@@ -163,7 +163,7 @@ class DataXceiver implements Runnable, F
     final String clientTraceFmt =
       clientName.length() > 0 && ClientTraceLog.isInfoEnabled()
         ? String.format(DN_CLIENTTRACE_FORMAT, localAddress, remoteAddress,
-            "%d", "HDFS_READ", clientName,
+            "%d", "HDFS_READ", clientName, "%d", 
             datanode.dnRegistration.getStorageID(), block)
         : datanode.dnRegistration + " Served block " + block + " to " +
             s.getInetAddress();



Mime
View raw message