Browse Source

HDFS-7899. Improve EOF error message (Contributed by Jagadesh Kiran N)

(cherry picked from commit 874c8ed2399ff5f760d358abae3e98c013f48d22)
Vinayakumar B 9 years ago
parent
commit
96fbe42bd7

+ 2 - 1
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/PBHelperClient.java

@@ -390,7 +390,8 @@ public class PBHelperClient {
       throws IOException {
     final int firstByte = input.read();
     if (firstByte == -1) {
-      throw new EOFException("Premature EOF: no length prefix available");
+      throw new EOFException(
+          "Unexpected EOF while trying to read response from server");
     }
 
     int size = CodedInputStream.readRawVarint32(firstByte, input);

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -1154,6 +1154,8 @@ Release 2.8.0 - UNRELEASED
     HDFS-9154. [OEV-Doc] : Document does not mention about "-f" and "-r" options
     (nijel via vinayakumarb)
 
+    HDFS-7899. Improve EOF error message (Jagadesh Kiran N via vinayakumarb)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES