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-5125) TestCreateEditsLog#testCanLoadCreatedEditsLog fails on Windows in globStatus
Date Thu, 22 Aug 2013 18:13:53 GMT

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

Chris Nauroth commented on HDFS-5125:
-------------------------------------

Also, just to follow up on some questions:

bq. if "/C:" is relative, which path is it relative to? If it is workingDir, what if working
dir is at another drive? For example: "/D:/foo".

"/C:" is relative, because we need to match the behavior of the local file system on Windows.
 On Windows, accessing the bare drive specifier accesses the current working directory of
the drive, and each drive can have a distinct current working directory.  Since the meaning
of "C:" or "D:" changes as the current working directory changes, the path is considered relative.
 See below for a full example of how this works in the shell.

bq. hasDriveLetterSpecifier allow first "/" to be skiped, but the code "int start = hasWindowsDrive(uri.getPath())
? 3 : 0;" always assume first "/" exists.

What is confusing about this is that path strings can enter the {{Path}} class either with
or without the leading '/' before the drive spec, so the regex needs to handle both.  Then,
after the path string gets translated to a {{URI}} internally, the leading '/' is guaranteed
to be in the URI.  I believe the current code in {{Path#isUriPathAbsolute}} is correct, because
this code only runs after the internal translation to {{URI}}.

{code}
C:\>cd C:\foo

C:\foo>dir C:
 Volume in drive C has no label.
 Volume Serial Number is C2FC-F17C

 Directory of C:\foo

08/22/2013  06:00 PM    <DIR>          .
08/22/2013  06:00 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  14,801,162,240 bytes free
C:\foo>cd C:\bar

C:\bar>dir C:
 Volume in drive C has no label.
 Volume Serial Number is C2FC-F17C

 Directory of C:\bar

08/22/2013  06:00 PM    <DIR>          .
08/22/2013  06:00 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  14,801,162,240 bytes free
C:\bar>cd D:\baz

C:\bar>dir D:
 Volume in drive D is Temporary Storage
 Volume Serial Number is B28B-7C3C

 Directory of D:\baz

08/22/2013  06:00 PM    <DIR>          .
08/22/2013  06:00 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  298,357,399,552 bytes free
C:\bar>cd D:\buz

C:\bar>dir D:
 Volume in drive D is Temporary Storage
 Volume Serial Number is B28B-7C3C

 Directory of D:\buz

08/22/2013  06:00 PM    <DIR>          .
08/22/2013  06:00 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  298,357,399,552 bytes free
{code}

                
> TestCreateEditsLog#testCanLoadCreatedEditsLog fails on Windows in globStatus
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-5125
>                 URL: https://issues.apache.org/jira/browse/HDFS-5125
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0, 2.1.1-beta
>            Reporter: Chris Nauroth
>            Assignee: Binglin Chang
>
> This test calls the {{CreateEditsLog}} tool, then runs {{globStatus}} on the local file
system to find the resulting files before moving them to a directory where a NameNode can
start up and read them.  The HADOOP-9877 patch has caused this test to start failing on Windows
due to internal calls to {{FileContext#getFileLinkStatus}} rejecting the {{Path}} arguments.

--
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

Mime
View raw message