[ https://issues.apache.org/jira/browse/HDFS-9799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15148193#comment-15148193 ]
Xiaoyu Yao commented on HDFS-9799: ---------------------------------- Thanks [~zhz] for reporting the issue and working on the fix. bq. The source of the IOException is from getEZForPath. So when getEZForPath gets an exception – meaning that the EZ of the given path cannot be determined at the time of calling, we should just return the Trash dir of the user's home. Even if the path does belong to an EZ, this will just mean the rm will fail later. Can you elaborate when getEZForPath gets an IOException? Based on EncryptionZoneManager#getEZINodeForPath, getEZForPath() just returns null instead of throwing IOException when a given path cannot be determined to be inside a EZ. This makes DFS#getTrashRoots() to include just the Trash dir of the user's home as returned result for non-EZ paths. Should we just fix the annotations? > Reimplement getCurrentTrashDir to remove incompatibility > -------------------------------------------------------- > > Key: HDFS-9799 > URL: https://issues.apache.org/jira/browse/HDFS-9799 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.8.0 > Reporter: Zhe Zhang > Assignee: Zhe Zhang > Priority: Blocker > Attachments: HDFS-9799.00.patch, HDFS-9799.01.patch, > HDFS-9799.02.patch, HDFS-9799.03.patch, HDFS-9799.04.patch > > > HDFS-8831 changed the signature of {{TrashPolicy#getCurrentTrashDir}} by > adding an IOException. This breaks other applications using this public API. > This JIRA aims to reimplement the logic to safely handle the IOException > within HDFS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)