From 709d5cbd713044da9810ec8e4b205b2f6b287a8d Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Tue, 8 Jul 2014 20:29:42 +0000 Subject: [PATCH] HDFS-6627. Rename DataNode#checkWriteAccess to checkReadAccess. Contributed by Liang Xie. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1608940 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/server/datanode/DataNode.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8b5b10db79..c3b9c68b64 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -272,6 +272,9 @@ Release 2.6.0 - UNRELEASED HDFS-6638. Shorten test run time with a smaller retry timeout setting. (Liang Xie via cnauroth) + HDFS-6627. Rename DataNode#checkWriteAccess to checkReadAccess. + (Liang Xie via cnauroth) + OPTIMIZATIONS BUG FIXES 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 5797c00c40..49341df834 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 @@ -2299,11 +2299,11 @@ private static void logRecoverBlock(String who, RecoveringBlock rb) { @Override // ClientDataNodeProtocol public long getReplicaVisibleLength(final ExtendedBlock block) throws IOException { - checkWriteAccess(block); + checkReadAccess(block); return data.getReplicaVisibleLength(block); } - private void checkWriteAccess(final ExtendedBlock block) throws IOException { + private void checkReadAccess(final ExtendedBlock block) throws IOException { if (isBlockTokenEnabled) { Set tokenIds = UserGroupInformation.getCurrentUser() .getTokenIdentifiers();