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
This commit is contained in:
Colin McCabe 2014-01-31 23:09:19 +00:00
parent 8ed6a8a5b2
commit 4a943f194c
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5153. Datanode should send block reports for each storage in a HDFS-5153. Datanode should send block reports for each storage in a
separate message. (Arpit Agarwal) separate message. (Arpit Agarwal)
HDFS-5859. DataNode#checkBlockToken should check block tokens even if
security is not enabled. (cmccabe)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery

View File

@ -1195,7 +1195,7 @@ public class DataNode extends Configured
private void checkBlockToken(ExtendedBlock block, Token<BlockTokenIdentifier> token, private void checkBlockToken(ExtendedBlock block, Token<BlockTokenIdentifier> token,
AccessMode accessMode) throws IOException { AccessMode accessMode) throws IOException {
if (isBlockTokenEnabled && UserGroupInformation.isSecurityEnabled()) { if (isBlockTokenEnabled) {
BlockTokenIdentifier id = new BlockTokenIdentifier(); BlockTokenIdentifier id = new BlockTokenIdentifier();
ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier()); ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier());
DataInputStream in = new DataInputStream(buf); DataInputStream in = new DataInputStream(buf);