[
https://issues.apache.org/jira/browse/HADOOP-13343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15371778#comment-15371778
]
Jason Lowe commented on HADOOP-13343:
-------------------------------------
Thanks for chiming in, [[email protected]] and [~cmccabe]. I filed it without
knowing for sure what the "right" fix is. As Colin points out, it may be
dangerous to change this behavior since it's been this way for so long.
Someone may have intentionally or accidentally relied on the behavior. So I
could see this as simply updating the javadoc to explain how globbing and
filtering interact without any semantic changes at all. Or we decide to fix
the semantics but only in 3.x, etc.
My personal preference would be to have it act consistent with globbing
patterns failing to match when the base path does exist. And I'm totally fine
if we decide this is best done on a major-release boundary to minimize the
surprises for users when upgrading.
> globStatus returns null for file path that exists but is filtered
> -----------------------------------------------------------------
>
> Key: HADOOP-13343
> URL: https://issues.apache.org/jira/browse/HADOOP-13343
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.7.2
> Reporter: Jason Lowe
> Priority: Minor
> Attachments: HADOOP-13343.001.patch
>
>
> If a file path without globs is passed to globStatus and the file exists but
> the specified input filter suppresses it then globStatus will return null
> instead of an empty array. This makes it impossible for the caller to
> discern the difference between the file not existing at all vs. being
> suppressed by the filter and is inconsistent with the way it handles globs
> for an existing dir but fail to match anything within the dir.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]