Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8589

ViewFs tests fail when tests and home dirs are nested

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.1, 2.0.0-alpha
    • 2.0.3-alpha
    • fs, test
    • None
    • Reviewed

    Description

      TestFSMainOperationsLocalFileSystem fails in case when the test root directory is under the user's home directory, and the user's home dir is deeper than 2 levels from /. This happens with the default 1-node installation of Jenkins.

      This is the failure log:

      org.apache.hadoop.fs.FileAlreadyExistsException: Path /var already exists as dir; cannot create link here
      	at org.apache.hadoop.fs.viewfs.InodeTree.createLink(InodeTree.java:244)
      	at org.apache.hadoop.fs.viewfs.InodeTree.<init>(InodeTree.java:334)
      	at org.apache.hadoop.fs.viewfs.ViewFileSystem$1.<init>(ViewFileSystem.java:167)
      	at org.apache.hadoop.fs.viewfs.ViewFileSystem.initialize(ViewFileSystem.java:167)
      	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2094)
      	at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:79)
      	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2128)
      	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2110)
      	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:290)
      	at org.apache.hadoop.fs.viewfs.ViewFileSystemTestSetup.setupForViewFileSystem(ViewFileSystemTestSetup.java:76)
      	at org.apache.hadoop.fs.viewfs.TestFSMainOperationsLocalFileSystem.setUp(TestFSMainOperationsLocalFileSystem.java:40)
      
      ...
      
      Standard Output
      2012-07-11 22:07:20,239 INFO  mortbay.log (Slf4jLog.java:info(67)) - Home dir base /var/lib
      

      The reason for the failure is that the code tries to mount links for both "/var" and "/var/lib", and it fails for the 2nd one as the "/var" is mounted already.

      The fix was provided in HADOOP-8036 but later it was reverted in HADOOP-8129.

      Attachments

        1. Hadoop-8589.patch
          20 kB
          Sanjay Radia
        2. HADOOP-8589.patch
          6 kB
          Harsh J
        3. HADOOP-8589.patch
          6 kB
          Andrey Klochkov
        4. hadoop-8589-sanjay.patch
          17 kB
          Sanjay Radia
        5. Hadoop-8589-v2.patch
          20 kB
          Sanjay Radia
        6. HADOOP-8859.patch
          2 kB
          Andrey Klochkov

        Issue Links

          Activity

            People

              sanjay.radia Sanjay Radia
              aklochkov Andrey Klochkov
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: