Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12207

A few DataXceiver#writeBlock cleanups related to optional storage IDs and types

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-alpha4
    • Fix Version/s: None
    • Component/s: datanode
    • Labels:
      None
    • Target Version/s:

      Description

      Here's the conversation that Ewan Higgs 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

            Activity

              People

              • Assignee:
                mackrorysd Sean Mackrory
                Reporter:
                andrew.wang Andrew Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: