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

TestGlobPaths should re-use the MiniDFSCluster to avoid failure on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0, 3.0.0-alpha1
    • 2.3.0
    • test
    • None
    • Reviewed

    Description

      Some test cases in TestGlobPaths fail on Windows because they try to create a new MiniDFSCluster though there is already one created at setUp(). This leads to failure on Windows because the new cluster will try to clean the old name node file that was opened by the existing cluster – on Windows, the process or thread cannot delete the file opened in normal Java APIs by another process or thread.

      An example failure run looks like the following.

      testGlobWithSymlinksOnFS(org.apache.hadoop.fs.TestGlobPaths)  Time elapsed: 47 sec  <<< ERROR!
      java.io.IOException: Could not fully delete E:\tr\hadoop-hdfs-project\hadoop-hdfs\target\test\data\dfs\name1
      	at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetConf(MiniDFSCluster.java:759)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:644)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:334)
      	at org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:316)
      	at org.apache.hadoop.fs.TestGlobPaths.testOnFileSystem(TestGlobPaths.java:805)
      	at org.apache.hadoop.fs.TestGlobPaths.testGlobWithSymlinksOnFS(TestGlobPaths.java:889)
      ...
      

      Attachments

        1. HDFS-5093.1.patch
          15 kB
          Chuan Liu
        2. HDFS-5093.patch
          15 kB
          Chuan Liu

        Issue Links

          Activity

            People

              chuanliu Chuan Liu
              chuanliu Chuan Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: