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] [Commented] (HDFS-8038) Fix TestOfflineImageViewer#testPBDelimitedWriter on Windows
Date Fri, 03 Apr 2015 17:30:54 GMT

    [ https://issues.apache.org/jira/browse/HDFS-8038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14394737#comment-14394737

Chris Nauroth commented on HDFS-8038:

Hi Xiaoyu.  I wonder if this one is actually a product bug instead of an incorrect test. 
Even when HDFS runs on Windows, the file paths within HDFS still use the Unix-style forward
slash separator instead of a back slash.  If offline image viewer running on Windows writes
out paths with back slashes, then those aren't actually the correct paths within HDFS.  I
suspect this is caused by {{PBImageDelimitedTextWriter#getEntry}} taking the HDFS path and
passing it through {{java.io.File}}, which has platform-specific behavior:

    String path = new File(parent, inode.getName().toStringUtf8()).toString();

What are your thoughts on this?

> Fix TestOfflineImageViewer#testPBDelimitedWriter on Windows
> -----------------------------------------------------------
>                 Key: HDFS-8038
>                 URL: https://issues.apache.org/jira/browse/HDFS-8038
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Minor
>         Attachments: HDFS-8038.00.patch
> The test assumes Linux path format during verification. The file system path should be
normalized to uri format before compare. 
> {code}
> expected:<[/emptydir, /dir0, /dir1/file2, /dir1, /dir1/file3, /dir2/file3, /dir1/file0,
/dir1/file1, /dir2/file1, /dir2/file2, /dir2, /dir0/file0, /dir2/file0, /dir0/file1, /dir0/file2,
/dir0/file3, /xattr]> 
> but was:<[\dir0, \dir0\file3, \dir0\file2, \dir0\file1, \xattr, \emptydir, \dir0\file0,
\dir1\file1, \dir1\file0, \dir1\file3, \dir1\file2, \dir2\file3, \, \dir1, \dir2\file0, \dirContainingInvalidXMLChar&#0;here,
\dir2, \dir2\file2, \dir2\file1]>
> {code}

This message was sent by Atlassian JIRA

View raw message