Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7240 Scaling HDFS
  3. HDFS-11619

Ozone: Unit tests running failed in Windows

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • ozone
    • None
    • Reviewed

    Description

      The unit tests run failed in Windows. The stack infos in my local when I ran the test TestAllocateContainer#testAllocate:

      java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/work-project/hadoop/hadoop-hdfs-project/hadoop-hdfs/target/test-classes/org/apache/hadoop/ozone/MiniOzoneCluster2f590eac-54a9-4f7d-9f91-911090d581aa\d54f6948-ea8c-4ade-8fa2-4b7bf849ed87\scm
      	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
      	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
      	at java.nio.file.Paths.get(Paths.java:84)
      	at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.configScmMetadata(MiniOzoneCluster.java:370)
      	at org.apache.hadoop.ozone.MiniOzoneCluster$Builder.build(MiniOzoneCluster.java:326)
      	at org.apache.hadoop.ozone.scm.TestAllocateContainer.init(TestAllocateContainer.java:54)
      

      The root cause of the failure is that the path generated for the scm is not a valid path. We should replace the following related code in MiniOzoneCluster.Builder#Builder().

            URL p = conf.getClass().getResource("");
            path = p.getPath().concat(MiniOzoneCluster.class.getSimpleName() + UUID
                .randomUUID().toString());
      

      One way maybe we can use GenericTestUtils#getTempPath to replace with it.

      Attachments

        Activity

          People

            linyiqun Yiqun Lin
            linyiqun Yiqun Lin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: