falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [3/5] git commit: FALCON-312 Falcon LogCleanupServiceTest seems to clean up root "/". Contributed by Venkatesh Seetharam
Date Tue, 06 May 2014 18:52:55 GMT
FALCON-312 Falcon LogCleanupServiceTest seems to clean up root "/". Contributed by Venkatesh
Seetharam


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/888a3eea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/888a3eea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/888a3eea

Branch: refs/heads/master
Commit: 888a3eead53c884dbce479e0ef23b51d70abade5
Parents: 8c48a2c
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Tue May 6 11:24:18 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Tue May 6 11:24:18 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                   | 3 +++
 .../main/java/org/apache/falcon/hadoop/JailedFileSystem.java  | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/888a3eea/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ca659e3..2a9a35b 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -40,6 +40,9 @@ Release Version: 0.5-incubating
     Venkatesh Seetharam)
    
   IMPROVEMENTS
+    FALCON-312 Falcon LogCleanupServiceTest seems to clean up root "/"
+    (Venkatesh Seetharam)
+
     FALCON-379 Document limitations of Hive support in Falcon (Venkatesh Seetharam)
 
     FALCON-421 Upgrade Hadoop to 2.4.0 (Sowmya Ramesh via Venkatesh Seetharam)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/888a3eea/hadoop-dependencies/src/main/java/org/apache/falcon/hadoop/JailedFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-dependencies/src/main/java/org/apache/falcon/hadoop/JailedFileSystem.java
b/hadoop-dependencies/src/main/java/org/apache/falcon/hadoop/JailedFileSystem.java
index e12a509..cdf758e 100644
--- a/hadoop-dependencies/src/main/java/org/apache/falcon/hadoop/JailedFileSystem.java
+++ b/hadoop-dependencies/src/main/java/org/apache/falcon/hadoop/JailedFileSystem.java
@@ -100,7 +100,12 @@ public class JailedFileSystem extends FileSystem {
 
     @Override
     public boolean delete(Path f, boolean recursive) throws IOException {
-        return localFS.delete(toLocalPath(f), recursive);
+        Path localPath = toLocalPath(f);
+        if (localPath.toUri().getPath().trim().equals("/")) {
+            throw new AssertionError("Attempting to delete root " + localPath);
+        }
+
+        return localFS.delete(localPath, recursive);
     }
 
     @Override


Mime
View raw message