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

getBlockLocations() does not resolve the .reserved path and generates incorrect edit logs when updating the atime

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 2.7.1, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      When FSNamesystem#getBlockLocations updates the access time of the INode, it uses the path passed from the client, which generates incorrect edit logs entries:

        <RECORD>
          <OPCODE>OP_TIMES</OPCODE>
          <DATA>
            <TXID>5085</TXID>
            <LENGTH>0</LENGTH>
            <PATH>/.reserved/.inodes/18230</PATH>
            <MTIME>-1</MTIME>
            <ATIME>1429908236392</ATIME>
          </DATA>
        </RECORD>
      

      Note that the NN does not resolve the /.reserved path when processing the edit log, therefore it eventually leads to a NPE when loading the edit logs.

        Attachments

        1. HDFS-8269.003.patch
          15 kB
          Haohui Mai
        2. HDFS-8269.002.patch
          14 kB
          Haohui Mai
        3. HDFS-8269.001.patch
          15 kB
          Haohui Mai
        4. HDFS-8269.000.patch
          12 kB
          Haohui Mai

          Issue Links

            Activity

              People

              • Assignee:
                wheat9 Haohui Mai
                Reporter:
                yeshavora Yesha Vora
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: