Liang Xie created HDFS-6627:
-------------------------------

             Summary: getReplicaVisibleLength() should do checkReadAccess 
insteading of checkWriteAccess
                 Key: HDFS-6627
                 URL: https://issues.apache.org/jira/browse/HDFS-6627
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: datanode
    Affects Versions: 3.0.0
            Reporter: Liang Xie
            Assignee: Liang Xie
         Attachments: HDFS-6627.txt

Just read getReplicaVisibleLength() code and found it, 
DataNode.checkWriteAccess is only invoked by 
DataNode.getReplicaVisibleLength(), let's rename it to checkReadAccess to avoid 
confusing, since the real impl here is check AccessMode.READ:
{code}
        blockPoolTokenSecretManager.checkAccess(id, null, block,
            BlockTokenSecretManager.AccessMode.READ);
{code}




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to