hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1127809 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
Date Thu, 26 May 2011 07:41:59 GMT
Author: eli
Date: Thu May 26 07:41:59 2011
New Revision: 1127809

URL: http://svn.apache.org/viewvc?rev=1127809&view=rev
Log:
HDFS-1997. Image transfer process misreports client side exceptions. Contributed by Todd Lipcon

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1127809&r1=1127808&r2=1127809&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu May 26 07:41:59 2011
@@ -1064,6 +1064,9 @@ Release 0.22.0 - Unreleased
     HDFS-1964. Fix incorrect HTML unescaping in DatanodeJspHelper
     (Aaron T. Myers via todd)
 
+    HDFS-1997. Image transfer process misreports client side exceptions.
+    (todd via eli)
+    
 Release 0.21.1 - Unreleased
     HDFS-1466. TestFcHdfsSymlink relies on /tmp/test not existing. (eli)
 

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java?rev=1127809&r1=1127808&r2=1127809&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/HdfsConfiguration.java Thu May 26 07:41:59
2011
@@ -104,5 +104,6 @@ public class HdfsConfiguration extends C
     deprecate("dfs.write.packet.size", DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_KEY);
     deprecate("dfs.block.size", DFSConfigKeys.DFS_BLOCK_SIZE_KEY);
     deprecate("dfs.datanode.max.xcievers", DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY);
+    deprecate("io.bytes.per.checksum", DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_KEY);
   }
 }

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java?rev=1127809&r1=1127808&r2=1127809&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
(original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
Thu May 26 07:41:59 2011
@@ -206,6 +206,7 @@ class TransferFsImage implements FSConst
       stream = new DigestInputStream(stream, digester);
     }
     FileOutputStream[] output = null;
+    boolean finishedReceiving = false;
 
     try {
       if (localPath != null) {
@@ -224,6 +225,7 @@ class TransferFsImage implements FSConst
           }
         }
       }
+      finishedReceiving = true;
     } finally {
       stream.close();
       if (output != null) {
@@ -234,7 +236,10 @@ class TransferFsImage implements FSConst
           }
         }
       }
-      if (received != advertisedSize) {
+      if (finishedReceiving && received != advertisedSize) {
+        // only throw this exception if we think we read all of it on our end
+        // -- otherwise a client-side IOException would be masked by this
+        // exception that makes it look like a server-side problem!
         throw new IOException("File " + str + " received length " + received +
                               " is not of the advertised size " +
                               advertisedSize);



Mime
View raw message