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/trunk@1563328 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Colin McCabe 2014-01-31 23:08:23 +00:00
parent 1f7dd7811a
commit f6bfe98639
2 changed files with 4 additions and 1 deletions

View File

@ -303,6 +303,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5804. HDFS NFS Gateway fails to mount and proxy when using Kerberos.
(Abin Shahab via jing9)
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

View File

@ -1194,7 +1194,7 @@ public class DataNode extends Configured
private void checkBlockToken(ExtendedBlock block, Token<BlockTokenIdentifier> 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);