hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject [21/30] hadoop git commit: HDFS-9302. WebHDFS throws NullPointerException if newLength is not provided. (Jagadesh Kiran N via yliu)
Date Fri, 30 Oct 2015 18:00:34 GMT
HDFS-9302. WebHDFS throws NullPointerException if newLength is not provided. (Jagadesh Kiran
N via yliu)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6ff6663f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6ff6663f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6ff6663f

Branch: refs/heads/HDFS-8966
Commit: 6ff6663f64476eab5612ae9eb409104f44c6e6c7
Parents: 97913f4
Author: yliu <yliu@apache.org>
Authored: Wed Oct 28 15:54:04 2015 +0800
Committer: yliu <yliu@apache.org>
Committed: Wed Oct 28 15:54:04 2015 +0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../server/namenode/web/resources/NamenodeWebHdfsMethods.java    | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6ff6663f/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index fc41df4..7f3052f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -2170,6 +2170,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9231. fsck doesn't list correct file path when Bad Replicas/Blocks
     are in a snapshot. (Xiao Chen via Yongjun Zhang)
 
+    HDFS-9302. WebHDFS throws NullPointerException if newLength is not
+    provided. (Jagadesh Kiran N via yliu)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6ff6663f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
index b03e074..04e89a7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
@@ -707,6 +707,10 @@ public class NamenodeWebHdfsMethods {
     }
     case TRUNCATE:
     {
+      if (newLength.getValue() == null) {
+        throw new IllegalArgumentException(
+            "newLength parameter is Missing");
+      }
       // We treat each rest request as a separate client.
       final boolean b = np.truncate(fullpath, newLength.getValue(), 
           "DFSClient_" + DFSUtil.getSecureRandom().nextLong());


Mime
View raw message