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

FileNotFoundException thrown in TestEditLogRace when just add a setPermission operation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: fs
    • Labels:
      None

      Description

      In TestEditLogRace.Transactions#run, add following code between mkdirs and delete.

       

      fs.setPermission(dirnamePath, p);

      It will be like. 

      fs.mkdirs(dirnamePath);
      fs.setPermission(dirnamePath, p);
      fs.delete(dirnamePath, true);

      then run test TestEditLogRace#testEditLogRolling, it will throw FileNotFoundException.

      java.io.FileNotFoundException: cannot find /thr-291-dir-2
      
      at org.apache.hadoop.hdfs.server.namenode.FSDirectory.resolveLastINode(FSDirectory.java:1524)
      at org.apache.hadoop.hdfs.server.namenode.FSDirAttrOp.unprotectedSetPermission(FSDirAttrOp.java:264)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.applyEditLogOp(FSEditLogLoader.java:656)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:287)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(FSEditLogLoader.java:182)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(FSEditLogLoader.java:159)
      at org.apache.hadoop.hdfs.server.namenode.TestEditLogRace.verifyEditLogs(TestEditLogRace.java:293)
      at org.apache.hadoop.hdfs.server.namenode.TestEditLogRace.testEditLogRolling(TestEditLogRace.java:258)
      

      It happens when verifing edit logs and finds the target dir does not exits. Any one could help figure out whether it makes sense or what makes it behaving that way?

        Attachments

          Activity

            People

            • Assignee:
              starphin star
              Reporter:
              starphin star
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: