hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaoyu Yao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8038) PBImageDelimitedTextWriter#getEntry output HDFS path in platform-specific format.
Date Sat, 04 Apr 2015 00:52:34 GMT

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

Xiaoyu Yao commented on HDFS-8038:

That's my first thought too and I do try that approach before submitting the 2nd patch. 
*Path(String, String)* cannot handle root where the parent is empty, i.e. Path("", "\"). We
could handle this by special handling root and bypass File object for other non-root file/dirs.

> PBImageDelimitedTextWriter#getEntry output HDFS path in platform-specific format.
> ---------------------------------------------------------------------------------
>                 Key: HDFS-8038
>                 URL: https://issues.apache.org/jira/browse/HDFS-8038
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: tools
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Minor
>         Attachments: HDFS-8038.00.patch, HDFS-8038.01.patch
> PBImageDelimitedTextWriter#getEntry taking the HDFS path and passing it through java.io.File,
which causes platform-specific behavior as the actual results shown in TestOfflineImageViewer#testPBDelimitedWriter()
on Windows OS.
> {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