This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 08a3114 HIVE-22273: Access check is failed when a temporary directory
is removed (Peter Vary reviewed by Marta Kuczora)
08a3114 is described below
commit 08a31149371b3e8571603f4bba04ec8cde518551
Author: Peter Vary <[email protected]>
AuthorDate: Mon Sep 30 14:51:28 2019 +0200
HIVE-22273: Access check is failed when a temporary directory is removed
(Peter Vary reviewed by Marta Kuczora)
---
common/src/java/org/apache/hadoop/hive/common/FileUtils.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
b/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
index 8b03faa..651b842 100644
--- a/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
+++ b/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
@@ -558,7 +558,13 @@ public final class FileUtils {
return true;
}
// check all children
- FileStatus[] childStatuses = fs.listStatus(fileStatus.getPath());
+ FileStatus[] childStatuses = null;
+ try {
+ childStatuses = fs.listStatus(fileStatus.getPath());
+ } catch (FileNotFoundException fe) {
+ LOG.debug("Skipping child access check since the directory is already
removed");
+ return true;
+ }
for (FileStatus childStatus : childStatuses) {
// check children recursively - recurse is true if we're here.
if (!checkIsOwnerOfFileHierarchy(fs, childStatus, userName, true)) {