From 4a943f194ca41ea5801442420e4f4a369aa1dd1a Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Fri, 31 Jan 2014 23:09:19 +0000 Subject: [PATCH] HDFS-5859. DataNode#checkBlockToken should check block tokens even if security is not enabled (cmccabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1563330 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/server/datanode/DataNode.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8296f85e040..fd12a63e175 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -14,6 +14,9 @@ Release 2.4.0 - UNRELEASED HDFS-5153. Datanode should send block reports for each storage in a separate message. (Arpit Agarwal) + HDFS-5859. DataNode#checkBlockToken should check block tokens even if + security is not enabled. (cmccabe) + OPTIMIZATIONS HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index 9725d93bc3e..43fcdc914fc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -1195,7 +1195,7 @@ public class DataNode extends Configured private void checkBlockToken(ExtendedBlock block, Token token, AccessMode accessMode) throws IOException { - if (isBlockTokenEnabled && UserGroupInformation.isSecurityEnabled()) { + if (isBlockTokenEnabled) { BlockTokenIdentifier id = new BlockTokenIdentifier(); ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier()); DataInputStream in = new DataInputStream(buf);