You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Raghu Angadi (JIRA)" <ji...@apache.org> on 2007/11/06 18:04:50 UTC
[jira] Issue Comment Edited: (HADOOP-2151) FileSyste.globPaths does
not validate the return list of Paths
[ https://issues.apache.org/jira/browse/HADOOP-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540483 ]
rangadi edited comment on HADOOP-2151 at 11/6/07 9:03 AM:
---------------------------------------------------------------
I think it should check for existence after noticing a glob.. not just when prev component is glob.
{code}
globPaths(path) {
...
return globPathsLevel(..., false);
}
globPthsLevel(..., shouldExist) {
....
if ( fp.hasPattern() ) {
shouldExist = true;
...
} else {
if ( !shouldExists || exists(tmpPath) ) {
tmpList.add(tmpPath);
}
....
return globPathsLevel(..., shouldExist);
}
{code}
note that {{shouldExist}} is never set to false once it is true.
Also whats with the underscores at the end :)? We don't have that in other parts of hadoop.
was (Author: rangadi):
I think it should check for existence after noticing a glob.. not just when prev component is glob.
{code}
globPaths(path) {
...
return globPathsLevel(..., false);
}
globPthsLevel(..., shouldExist) {
....
if ( fp.hasPattern() ) {
shouldExist = true;
...
} else {
if ( !shouldExists || exists(tmpPath) ) {
tmpList.add(tmpPath);
}
....
return globPathsLevel(..., shouldExist);
}
{code}
Also whats with the underscores at the end :)? We don't have that in other parts of hadoop.
> FileSyste.globPaths does not validate the return list of Paths
> --------------------------------------------------------------
>
> Key: HADOOP-2151
> URL: https://issues.apache.org/jira/browse/HADOOP-2151
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Affects Versions: 0.14.3, 0.15.0
> Reporter: lohit vijayarenu
> Fix For: 0.16.0
>
> Attachments: HADOOP-2151.patch
>
>
> FileSystem.globPaths does not validate the return list of Paths.
> Here is an example.
> Consider a directory structure like
> /user/foo/DIR1/FILE1
> /user/foo/DIR2
> now if we pass an input path like "/user/foo/*/FILE1" to FileSystem.globPaths()
> It returns 2 entries as shown below
> /user/foo/DIR1/FILE1
> /user/foo/DIR2/FILE1
> Should globPaths validate this and return only valid Paths? This behavior was caught in FileSystem.validateInput() where an IOException is thrown while processing such a directory structure.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.