[
https://issues.apache.org/jira/browse/HADOOP-20062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shilun Fan resolved HADOOP-20062.
---------------------------------
Fix Version/s: 3.6.0
Hadoop Flags: Reviewed
Assignee: Yang Jie
Resolution: Fixed
> FileContext#setStoragePolicy, #unsetStoragePolicy and #satisfyStoragePolicy
> pass the unresolved path to the file system
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-20062
> URL: https://issues.apache.org/jira/browse/HADOOP-20062
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 3.6.0
> Reporter: Yang Jie
> Assignee: Yang Jie
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.6.0
>
>
> These three methods qualify the path with fixRelativePart() and run it
> through an FSLinkResolver, but inside {{next(fs, p)}} they call the file
> system with the caller's original path instead of {{p}}. As a result:
> * A relative path is not resolved against the working directory. On HDFS,
> {{fc.setStoragePolicy(new Path("dir"), "COLD")}} fails with
> "InvalidPathException: relative paths not allowed", while
> {{fc.getStoragePolicy(new Path("dir"))}} on the same FileContext works.
> * When the file system throws UnresolvedLinkException, the resolver retries
> with the link path again, so the call never reaches the link target and ends
> with "Possible cyclic loop while following symbolic link".
> Every other FSLinkResolver in FileContext passes {{p}}, and the fix does the
> same. Nothing changes for an absolute path without symlinks. HDFS-17843 is a
> similar issue in DistributedFileSystem.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]