Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 5ADDADBEF for ; Mon, 29 Oct 2012 07:41:18 +0000 (UTC) Received: (qmail 27642 invoked by uid 500); 29 Oct 2012 07:41:16 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 25783 invoked by uid 500); 29 Oct 2012 07:41:14 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 25638 invoked by uid 99); 29 Oct 2012 07:41:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 07:41:13 +0000 Date: Mon, 29 Oct 2012 07:41:13 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1686987295.38269.1351496473490.JavaMail.jiratomcat@arcas> In-Reply-To: <555385334.11667.1350933493235.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (HADOOP-8957) FileContext.getFileContext causes multiple test failures on Windows due to InvocationTargetException 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/HADOOP-8957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth updated HADOOP-8957: ---------------------------------- Attachment: HADOOP-8957.patch The attached patch fixes multiple bugs in ViewFS when running on Windows. I'd like to start the patch on trunk and then immediately merge to branch-trunk-win after commit. Here is a summary of the changes: # AbstractFileSystem.isValidName was catching file names with ':' as invalid. This is not correct on a local file system on Windows, where ':' is valid in a drive specification. To fix this, I refactored isValidName such that only HDFS (and not other file systems like local) enforce these rules. I added new tests to check that this worked. I also enhanced a test in TestDFSUtil. # ChRootedFs was calling Path.toString and then trimming the first character to remove the first slash. On Windows, if the Path has a drive specification, then toString removes the first slash. Instead, we can use Path.toUri().getPath(). # ViewFileSystem.InternalDirOfViewFs.getFileStatus contained a call to Path.makeQualified with a null working directory. This throws NullPointerException if the default URI is not absolute. This condition can happen on Windows, where the tree of paths can transition from absolute to relative to absolute. (/ is absolute, /C: is relative, and /C:/foo is absolute.) To fix this, we can resolve against / for the working directory instead of null. > FileContext.getFileContext causes multiple test failures on Windows due to InvocationTargetException > ---------------------------------------------------------------------------------------------------- > > Key: HADOOP-8957 > URL: https://issues.apache.org/jira/browse/HADOOP-8957 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 3.0.0, trunk-win > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Attachments: HADOOP-8957.patch > > > This appears to be a problem with parsing a Windows-specific path, ultimately throwing InvocationTargetException from AbstractFileSystem.newInstance. -- 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