Description
Here's the conversation that ehiggs and I had on HDFS-12151 regarding some improvements:
Should we use nst > 0 rather than targetStorageTypes.length > 0 (amended) here for clarity?
Yes.
Should the targetStorageTypes.length > 0 check really be nsi > 0? We could elide it then since it's already captured in the outside if.
This does look redundant since targetStorageIds.length will be either 0 or == targetStorageTypes.length
Finally, I don't understand why we need to add the targeted ID/type for checkAccess. Each DN only needs to validate itself, yea? BTSM#checkAccess indicates this in its javadoc, but it looks like we run through ourselves and the targets each time:
That seems like a good simplification. I think I had assumed the BTI and requested types being checked should be the same (String - String, uint64 - uint64); but I don't see a reason why they have to be. Chris Douglas, what do you think?
Attachments
Issue Links
- relates to
-
HDFS-12151 Hadoop 2 clients cannot writeBlock to Hadoop 3 DataNodes
- Resolved
-
HDFS-9807 Add an optional StorageID to writes
- Resolved