You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2013/07/30 04:07:49 UTC
[jira] [Commented] (HADOOP-9774) RawLocalFileSystem.listStatus()
return absolute paths when input path is relative on Windows
[ https://issues.apache.org/jira/browse/HADOOP-9774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723274#comment-13723274 ]
Hadoop QA commented on HADOOP-9774:
-----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12594837/HADOOP-9774-2.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 2 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-common-project/hadoop-common:
org.apache.hadoop.fs.viewfs.TestChRootedFs
org.apache.hadoop.fs.viewfs.TestViewFsTrash
org.apache.hadoop.fs.TestHarFileSystemBasics
org.apache.hadoop.fs.TestFSMainOperationsLocalFileSystem
org.apache.hadoop.fs.viewfs.TestChRootedFileSystem
org.apache.hadoop.fs.TestSymlinkLocalFSFileSystem
org.apache.hadoop.fs.TestLocalFSFileContextMainOperations
org.apache.hadoop.fs.shell.TestPathData
org.apache.hadoop.fs.TestPath
org.apache.hadoop.util.TestGenericOptionsParser
org.apache.hadoop.fs.TestLocal_S3FileContextURI
org.apache.hadoop.fs.TestAfsCheckPath
org.apache.hadoop.fs.TestFsShellCopy
org.apache.hadoop.fs.viewfs.TestViewFsLocalFs
org.apache.hadoop.fs.TestTrash
org.apache.hadoop.fs.viewfs.TestFcMainOperationsLocalFs
org.apache.hadoop.fs.TestFsShellReturnCode
org.apache.hadoop.fs.TestFileSystemCanonicalization
org.apache.hadoop.fs.TestS3_LocalFileContextURI
org.apache.hadoop.fs.s3native.TestInMemoryNativeS3FileSystemContract
org.apache.hadoop.fs.viewfs.TestViewFsWithAuthorityLocalFs
org.apache.hadoop.fs.TestHarFileSystem
org.apache.hadoop.fs.TestLocalDirAllocator
org.apache.hadoop.fs.viewfs.TestFSMainOperationsLocalFileSystem
org.apache.hadoop.fs.TestSymlinkLocalFSFileContext
org.apache.hadoop.fs.shell.TestCopy
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2874//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2874//console
This message is automatically generated.
> RawLocalFileSystem.listStatus() return absolute paths when input path is relative on Windows
> --------------------------------------------------------------------------------------------
>
> Key: HADOOP-9774
> URL: https://issues.apache.org/jira/browse/HADOOP-9774
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 3.0.0, 2.1.0-beta
> Reporter: shanyu zhao
> Attachments: HADOOP-9774-2.patch, HADOOP-9774.patch
>
>
> On Windows, when using RawLocalFileSystem.listStatus() to enumerate a relative path (without drive spec), e.g., "file:///mydata", the resulting paths become absolute paths, e.g., ["file://E:/mydata/t1.txt", "file://E:/mydata/t2.txt"...].
> Note that if we use it to enumerate an absolute path, e.g., "file://E:/mydata" then the we get the same results as above.
> This breaks some hive unit tests which uses local file system to simulate HDFS when testing, therefore the drive spec is removed. Then after listStatus() the path is changed to absolute path, hive failed to find the path in its map reduce job.
> You'll see the following exception:
> [junit] java.io.IOException: cannot find dir = pfile:/E:/GitHub/hive-monarch/build/ql/test/data/warehouse/src/kv1.txt in pathToPartitionInfo: [pfile:/GitHub/hive-monarch/build/ql/test/data/warehouse/src]
> [junit] at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getPartitionDescFromPathRecursively(HiveFileFormatUtils.java:298)
> This problem is introduced by this JIRA:
> HADOOP-8962
> Prior to the fix for HADOOP-8962 (merged in 0.23.5), the resulting paths are relative paths if the parent paths are relative, e.g., ["file:///mydata/t1.txt", "file:///mydata/t2.txt"...]
> This behavior change is a side effect of the fix in HADOOP-8962, not an intended change. The resulting behavior, even though is legitimate from a function point of view, break consistency from the caller's point of view. When the caller use a relative path (without drive spec) to do listStatus() the resulting path should be relative. Therefore, I think this should be fixed.
--
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