hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4470) several HDFS tests attempt file operations on invalid HDFS paths when running on Windows
Date Wed, 06 Feb 2013 22:17:13 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chris Nauroth updated HDFS-4470:

    Attachment: HDFS-4470.2.patch

It is a very bad idea to place test data under /tmp like in /tmp/TestLargeBlock. This files
are not deleted by clean target and will cause non-deterministic behaviour for tests.

It's true for local file system that cleanup can be a headache, and it doesn't have this problem
as long as "/tmp" is in HDFS.

Yes, just to confirm, this patch does not change anything about the local file system paths
used either for local file system testing or HDFS's workspace.  Running {{TestListFiles}}
still uses a directory under test.build.data.  Running {{TestListFilesInDFS}}, the {{MiniDFSCluster}}
instance still uses a directory under test.build.data for its working directory.  All of this
still gets cleaned up by running "mvn clean".  The only thing that has changed is the HDFS
file paths, because HDFS would reject a path like "C:\foo\bar".

In TestListFiles, the method getTestDir() doesn't really return the test directory.

Thanks for the feeback.  Here is an updated patch that changes getTestDir to return TEST_DIR.
 The static initialization block guarantees that TEST_DIR always starts with a default value
that uses test.build.data, so there is no need for an additional null check.  Does the new
patch look good?

> several HDFS tests attempt file operations on invalid HDFS paths when running on Windows
> ----------------------------------------------------------------------------------------
>                 Key: HDFS-4470
>                 URL: https://issues.apache.org/jira/browse/HDFS-4470
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-4470.1.patch, HDFS-4470.2.patch
> For several tests, the path used for testing HDFS operations is driven from the test.build.data
property.  When running on Windows, this will contain a drive spec.  The ':' is not valid
in an HDFS path, so this causes the tests to fail prematurely.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message