[
https://issues.apache.org/jira/browse/HDFS-6627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HDFS-6627:
--------------------------------
Target Version/s: 3.0.0, 2.6.0
Affects Version/s: 2.5.0
Hadoop Flags: Reviewed
+1 for the patch. I traced this back to HDFS-1813, which changed the access
check from write to read (correctly) but didn't update the method name. I'll
commit this.
bq. -1 tests included. The patch doesn't appear to include any new or modified
tests.
No tests are necessary, because this is just renaming a method.
> 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, 2.5.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)