hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1127816 - in /hadoop/hdfs/branches/branch-0.22: ./ src/c++/libhdfs/ src/contrib/hdfsproxy/ src/java/ src/java/org/apache/hadoop/hdfs/server/datanode/ src/java/org/apache/hadoop/hdfs/server/namenode/ src/test/hdfs/ src/test/hdfs/org/apache/...
Date Thu, 26 May 2011 07:58:22 GMT
Author: eli
Date: Thu May 26 07:58:22 2011
New Revision: 1127816

URL: http://svn.apache.org/viewvc?rev=1127816&view=rev
Log:
HDFS-1997. svn merge -c 1127809 from trunk

Added:
    hadoop/hdfs/branches/branch-0.22/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestTransferFsImage.java
Modified:
    hadoop/hdfs/branches/branch-0.22/   (props changed)
    hadoop/hdfs/branches/branch-0.22/CHANGES.txt
    hadoop/hdfs/branches/branch-0.22/build.xml   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/c++/libhdfs/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/contrib/hdfsproxy/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/java/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java
  (props changed)
    hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
    hadoop/hdfs/branches/branch-0.22/src/test/hdfs/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/webapps/datanode/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/   (props changed)
    hadoop/hdfs/branches/branch-0.22/src/webapps/secondary/   (props changed)

Propchange: hadoop/hdfs/branches/branch-0.22/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -2,4 +2,4 @@
 /hadoop/core/branches/branch-0.19/hdfs:713112
 /hadoop/hdfs/branches/HDFS-265:796829-820463
 /hadoop/hdfs/branches/branch-0.21:820487
-/hadoop/hdfs/trunk:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Modified: hadoop/hdfs/branches/branch-0.22/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/CHANGES.txt?rev=1127816&r1=1127815&r2=1127816&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/CHANGES.txt (original)
+++ hadoop/hdfs/branches/branch-0.22/CHANGES.txt Thu May 26 07:58:22 2011
@@ -540,6 +540,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
 
   IMPROVEMENTS

Propchange: hadoop/hdfs/branches/branch-0.22/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/build.xml:779102
 /hadoop/hdfs/branches/HDFS-265/build.xml:796829-820463
 /hadoop/hdfs/branches/branch-0.21/build.xml:820487
-/hadoop/hdfs/trunk/build.xml:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/build.xml:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/c++/libhdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -1,4 +1,4 @@
 /hadoop/common/trunk/src/c++/libhdfs:1096645
 /hadoop/core/branches/branch-0.19/mapred/src/c++/libhdfs:713112
 /hadoop/core/trunk/src/c++/libhdfs:776175-784663
-/hadoop/hdfs/trunk/src/c++/libhdfs:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/c++/libhdfs:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/contrib/hdfsproxy/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/src/contrib/hdfsproxy:776175-784663
 /hadoop/hdfs/branches/HDFS-265/src/contrib/hdfsproxy:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/contrib/hdfsproxy:820487
-/hadoop/hdfs/trunk/src/contrib/hdfsproxy:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/contrib/hdfsproxy:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/src/hdfs:776175-785643,785929-786278
 /hadoop/hdfs/branches/HDFS-265/src/java:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/java:820487
-/hadoop/hdfs/trunk/src/java:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/java:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -5,4 +5,4 @@
 /hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:776175-785643,785929-786278
 /hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:820487
-/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Modified: hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java?rev=1127816&r1=1127815&r2=1127816&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
(original)
+++ hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
Thu May 26 07:58:22 2011
@@ -196,6 +196,7 @@ class TransferFsImage implements FSConst
     long received = 0;
     InputStream stream = connection.getInputStream();
     FileOutputStream[] output = null;
+    boolean finishedReceiving = false;
 
     try {
       if (localPath != null) {
@@ -214,6 +215,7 @@ class TransferFsImage implements FSConst
           }
         }
       }
+      finishedReceiving = true;
     } finally {
       stream.close();
       if (output != null) {
@@ -224,7 +226,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);

Propchange: hadoop/hdfs/branches/branch-0.22/src/test/hdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,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:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/test/hdfs:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Added: hadoop/hdfs/branches/branch-0.22/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestTransferFsImage.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestTransferFsImage.java?rev=1127816&view=auto
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestTransferFsImage.java
(added)
+++ hadoop/hdfs/branches/branch-0.22/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestTransferFsImage.java
Thu May 26 07:58:22 2011
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hdfs.server.namenode;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdfs.HdfsConfiguration;
+import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.hadoop.util.StringUtils;
+import org.junit.Test;
+
+public class TestTransferFsImage {
+
+  /**
+   * Regression test for HDFS-1997. Test that, if an exception
+   * occurs on the client side, it is properly reported as such
+   */
+  @Test
+  public void testClientSideException() throws IOException {
+
+    Configuration conf = new HdfsConfiguration();
+    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
+      .numDataNodes(0).build();
+    try {
+      
+      String fsName = NameNode.getHostPortString(
+          cluster.getNameNode().getHttpAddress());
+      String id = "getimage=1";
+
+      File[] localPath = new File[] {
+         new File("/xxxxx-does-not-exist/blah") 
+      };
+    
+      TransferFsImage.getFileClient(fsName, id, localPath);
+      fail("Didn't get an exception!");
+    } catch (IOException ioe) {
+      assertTrue("Expected FNFE, got: " + StringUtils.stringifyException(ioe),
+          ioe instanceof FileNotFoundException);
+    } finally {
+      cluster.shutdown();      
+    }
+  }
+}

Propchange: hadoop/hdfs/branches/branch-0.22/src/webapps/datanode/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/src/webapps/datanode:776175-784663
 /hadoop/hdfs/branches/HDFS-265/src/webapps/datanode:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/datanode:820487
-/hadoop/hdfs/trunk/src/webapps/datanode:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/webapps/datanode:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/src/webapps/hdfs:776175-784663
 /hadoop/hdfs/branches/HDFS-265/src/webapps/hdfs:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/hdfs:820487
-/hadoop/hdfs/trunk/src/webapps/hdfs:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/webapps/hdfs:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809

Propchange: hadoop/hdfs/branches/branch-0.22/src/webapps/secondary/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 26 07:58:22 2011
@@ -3,4 +3,4 @@
 /hadoop/core/trunk/src/webapps/secondary:776175-784663
 /hadoop/hdfs/branches/HDFS-265/src/webapps/secondary:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/secondary:820487
-/hadoop/hdfs/trunk/src/webapps/secondary:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312
+/hadoop/hdfs/trunk/src/webapps/secondary:1036213,1036303,1036310,1036631,1036767,1037047,1037109,1037961,1039957,1040005,1040411,1041190,1041261,1042067,1042069,1042517,1043301,1043308,1043314,1044102,1044218,1050109,1050125,1051134,1051334,1051603,1052169,1053203,1054807,1054858,1059508,1065860,1068725,1070025,1071023,1095235,1095245,1095830,1095963,1096645,1096647,1099972,1100054,1100279,1103920,1103987,1126312,1127809



Mime
View raw message