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 19:01:37 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/94d24163
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/94d24163
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/94d24163

Branch: refs/heads/branch-0.5
Commit: 94d24163718d2323e6606eb6fc73211e83f0ed51
Parents: 7547a97
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Tue May 6 11:24:30 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Tue May 6 11:24:30 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/94d24163/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8ae3ba4..380d734 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,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/94d24163/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