Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A30DF173C3 for ; Sat, 4 Apr 2015 00:52:35 +0000 (UTC) Received: (qmail 77525 invoked by uid 500); 4 Apr 2015 00:52:34 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 77470 invoked by uid 500); 4 Apr 2015 00:52:34 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 77428 invoked by uid 99); 4 Apr 2015 00:52:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Apr 2015 00:52:34 +0000 Date: Sat, 4 Apr 2015 00:52:34 +0000 (UTC) From: "Xiaoyu Yao (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8038) PBImageDelimitedTextWriter#getEntry output HDFS path in platform-specific format. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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�here, \dir2, \dir2\file2, \dir2\file1]> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)