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) PBImageDelimitedTextWriter#getEntry output HDFS path in platform-specific format.
Date Mon, 06 Apr 2015 16:27:12 GMT

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

Chris Nauroth commented on HDFS-8038:

Yes, I see your point about root.  Can we please go ahead with a change to use special case
handling for root?  Maybe if {{parent}} is empty then we use the single-argument constructor
of {{Path}}.

Ideally, I'd prefer that all usage of {{java.io.File}} be removed from this class.  We generally
use {{java.io.File}} when we know the path always refers to a local file system.  Since Offline
Image Viewer always processes paths from HDFS instead of a local file system, I think this
can be a source of confusion in the code.

Does {{PBImageTextWriter}} also have the same bug?

> 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