Hadoop Common
  1. Hadoop Common
  2. HADOOP-8766

FileContextMainOperationsBaseTest should randomize the root dir

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: test
    • Labels:

      Description

      FileContextMainOperationsBaseTest should randomize the name of the root directory it creates. It currently hardcodes LOCAL_FS_ROOT_URI to /tmp/test.

      This causes the job to fail if it clashes with another jobs that also uses that path. Eg

      org.apache.hadoop.fs.FileAlreadyExistsException: Parent path is not a directory: file:/tmp/test
              at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:362)
              at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:373)
              at org.apache.hadoop.fs.FileSystem.primitiveMkdir(FileSystem.java:931)
              at org.apache.hadoop.fs.DelegateToFileSystem.mkdir(DelegateToFileSystem.java:143)
              at org.apache.hadoop.fs.FilterFs.mkdir(FilterFs.java:189)
              at org.apache.hadoop.fs.FileContext$4.next(FileContext.java:706)
              at org.apache.hadoop.fs.FileContext$4.next(FileContext.java:703)
              at org.apache.hadoop.fs.FileContext$FSLinkResolver.resolve(FileContext.java:2333)
              at org.apache.hadoop.fs.FileContext.mkdir(FileContext.java:703)
              at org.apache.hadoop.fs.FileContextMainOperationsBaseTest.testWorkingDirectory(FileContextMainOperationsBaseTest.java:178)
      
      1. HADOOP-8766.001.patch
        2 kB
        Colin Patrick McCabe

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            Eli Collins
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development