You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by st...@apache.org on 2018/02/07 20:55:38 UTC

hive git commit: HIVE-18639: HiveMetaStoreFsImpl#deleteDir should check return value of FileUtils#moveToTrash (Sahil Takiar, reviewed by Vihang Karajgaonkar)

Repository: hive
Updated Branches:
  refs/heads/master cf3394de0 -> 075077d3c


HIVE-18639: HiveMetaStoreFsImpl#deleteDir should check return value of FileUtils#moveToTrash (Sahil Takiar, reviewed by Vihang Karajgaonkar)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/075077d3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/075077d3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/075077d3

Branch: refs/heads/master
Commit: 075077d3c50ca24826aa76b06c041b949bfbc002
Parents: cf3394d
Author: Sahil Takiar <ta...@gmail.com>
Authored: Wed Feb 7 12:53:30 2018 -0800
Committer: Sahil Takiar <st...@cloudera.com>
Committed: Wed Feb 7 12:53:44 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/075077d3/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
index 8322cb8..03de6c0 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
@@ -38,7 +38,9 @@ public class HiveMetaStoreFsImpl implements MetaStoreFS {
   public boolean deleteDir(FileSystem fs, Path f, boolean recursive,
       boolean ifPurge, Configuration conf) throws MetaException {
     try {
-      FileUtils.moveToTrash(fs, f, conf, ifPurge);
+      if (FileUtils.moveToTrash(fs, f, conf, ifPurge)) {
+        return true;
+      }
       if (fs.exists(f)) {
         throw new MetaException("Unable to delete directory: " + f);
       }