You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Aaron T. Myers (JIRA)" <ji...@apache.org> on 2012/04/24 10:11:34 UTC
[jira] [Created] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Aaron T. Myers created HADOOP-8310:
--------------------------------------
Summary: FileContext#checkPath should handle URIs with no port
Key: HADOOP-8310
URL: https://issues.apache.org/jira/browse/HADOOP-8310
Project: Hadoop Common
Issue Type: Bug
Components: fs
Affects Versions: 2.0.0
Reporter: Aaron T. Myers
Assignee: Aaron T. Myers
AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262267#comment-13262267 ]
Todd Lipcon commented on HADOOP-8310:
-------------------------------------
+1 for this small fix in lieu of reworking the whole thing.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260773#comment-13260773 ]
Daryn Sharp commented on HADOOP-8310:
-------------------------------------
{{AbstractFileSystem}} should use the same implementation as {{FileSystem}}. This patch doesn't appear to support canonicalization correctly.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron T. Myers updated HADOOP-8310:
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Hadoop Flags: Reviewed
Status: Resolved (was: Patch Available)
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "John George (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260890#comment-13260890 ]
John George commented on HADOOP-8310:
-------------------------------------
@Daryn - do you think that should be handled as part of another JIRA since this specifically addresses a different issue?
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263672#comment-13263672 ]
Hudson commented on HADOOP-8310:
--------------------------------
Integrated in Hadoop-Mapreduce-trunk #1062 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1062/])
HADOOP-8310. FileContext#checkPath should handle URIs with no port. Contributed by Aaron T. Myers. (Revision 1331007)
Result = FAILURE
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331007
Files :
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260887#comment-13260887 ]
Daryn Sharp commented on HADOOP-8310:
-------------------------------------
bq. The same implementation of checkPath?
Yes, {{FileSystem#checkPath}} has code to handle host canonicalization that works in conjunction with host-based tokens. It's an oversight on my part that it didn't make it into {{FileContext}}...
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron T. Myers updated HADOOP-8310:
-----------------------------------
Attachment: HADOOP-8310.patch
Here's a patch which fixes the issue, by strictly comparing initially only the host components of the URIs, instead of the full authorities.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262827#comment-13262827 ]
Aaron T. Myers commented on HADOOP-8310:
----------------------------------------
Thanks a lot for the review, Todd. I've just committed this to trunk and branch-2.
Daryn: I've filed HADOOP-8320 as a follow-up JIRA.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261050#comment-13261050 ]
Aaron T. Myers commented on HADOOP-8310:
----------------------------------------
bq. @Daryn - do you think that should be handled as part of another JIRA since this specifically addresses a different issue?
That would be my preference as well. Making FC use FS's checkPath implementation is a bigger, potentially more destabilizing change. It's also not obvious to me that such a change would be entirely compatible, consdering FS#checkPath currently throws IllegalArgEx, whereas FC throws InvalidPathEx.
Perhaps we can commit this patch as-is, and open another JIRA to make the two methods share code.
Is that OK by you, Daryn?
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260367#comment-13260367 ]
Hadoop QA commented on HADOOP-8310:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12523944/HADOOP-8310.patch
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 1 new or modified test files.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 eclipse:eclipse. The patch built with eclipse:eclipse.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed these unit tests:
org.apache.hadoop.fs.viewfs.TestViewFsTrash
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/884//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/884//console
This message is automatically generated.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "John George (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260633#comment-13260633 ]
John George commented on HADOOP-8310:
-------------------------------------
Good catch Aaron. +1 as long as the test failure is unrelated.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron T. Myers updated HADOOP-8310:
-----------------------------------
Status: Patch Available (was: Open)
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261644#comment-13261644 ]
Daryn Sharp commented on HADOOP-8310:
-------------------------------------
They actually are related. When I changed the {{FileSystem#checkPath}} handling, I also removed {{DistributedFileSystem#checkPath}} due to redundancy with the improved {{FileSystem#checkPath}}. Part of the change specifically involved having {{FileSystem#checkPath}} handle default ports. That change is probably what broke {{FileContext}}.
{{FileContext}} really should have identical URI handling to {{FileSystem}}, sans the exception types. {{InvalidPathException}} derives from {{IllegalArgumentException}} so the difference won't matter esp. since {{FileContext}} can continue to throw the path exception.
+0 All that said, I'm very reluctantly willing to let this patch go as-is if there is a followup jira.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260752#comment-13260752 ]
Aaron T. Myers commented on HADOOP-8310:
----------------------------------------
Thanks a lot for the review, John. I'm confident that the test failure of TestViewFsTrash is unrelated.
I should also mention that I discovered this issue because without this fix one cannot view the conf page of a running MR2 job in a cluster whose fs.default.name is configured without a port. I manually verified that with this fix, one can get to the page just fine.
I also ran the full HDFS test suite with this patch applied and everything passed.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13260827#comment-13260827 ]
Aaron T. Myers commented on HADOOP-8310:
----------------------------------------
bq. AbstractFileSystem should use the same implementation as FileSystem.
The same implementation of checkPath?
bq. This patch doesn't appear to support canonicalization correctly.
I don't follow. This patch doesn't change canonicalization at all.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263635#comment-13263635 ]
Hudson commented on HADOOP-8310:
--------------------------------
Integrated in Hadoop-Hdfs-trunk #1027 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1027/])
HADOOP-8310. FileContext#checkPath should handle URIs with no port. Contributed by Aaron T. Myers. (Revision 1331007)
Result = FAILURE
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1331007
Files :
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Posted by "Jason Lowe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Lowe updated HADOOP-8310:
-------------------------------
Fix Version/s: 0.23.5
Thanks Aaron, I pulled this into branch-0.23.
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0-alpha
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0-alpha, 0.23.5
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
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
[jira] [Updated] (HADOOP-8310) FileContext#checkPath should handle
URIs with no port
Posted by "Robert Joseph Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Joseph Evans updated HADOOP-8310:
----------------------------------------
Fix Version/s: (was: 0.23.5)
0.23.4
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0-alpha
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0-alpha, 0.23.4
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
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
[jira] [Commented] (HADOOP-8310) FileContext#checkPath should
handle URIs with no port
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467672#comment-13467672 ]
Hudson commented on HADOOP-8310:
--------------------------------
Integrated in Hadoop-Hdfs-0.23-Build #392 (See [https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/392/])
svn merge -c 1331007 FIXES: HADOOP-8310. FileContext#checkPath should handle URIs with no port. Contributed by Aaron T. Myers. (Revision 1392622)
Result = UNSTABLE
jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1392622
Files :
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
* /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
> FileContext#checkPath should handle URIs with no port
> -----------------------------------------------------
>
> Key: HADOOP-8310
> URL: https://issues.apache.org/jira/browse/HADOOP-8310
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.0.0-alpha
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 2.0.0-alpha, 0.23.4
>
> Attachments: HADOOP-8310.patch
>
>
> AbstractFileSystem#checkPath is used to verify that a given path is for the same file system as represented by the AbstractFileSystem instance.
> The original intent of the code was to allow for no port to be provided in the checked path, if the default port was being used by the AbstractFileSystem instance. However, before performing port handling, AFS#checkPath compares the full URI authorities for equality. Since the URI authority includes the port, the port handling code is never reached, and thus valid paths may be erroneously considered invalid.
--
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