distributedlog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject incubator-distributedlog git commit: DL-173: changed FileUtils.deleteDirectory to FileUtils.forceDeleteOnExit so d…
Date Thu, 13 Apr 2017 04:36:37 GMT
Repository: incubator-distributedlog
Updated Branches:
  refs/heads/release-0.4.0-incubating 49c31cd53 -> 58f18dc36


DL-173: changed FileUtils.deleteDirectory to FileUtils.forceDeleteOnExit so d…

I am doing a new pull request because I deleted the branch in the remote.
Actions done to fix the conflict.
1. git checkout DL-173
2. git checkout master distributedlog-protocol/src/main/thrift/service.thrift
3. git fetch
4. git add *
5. git commit with message

The actual fix for this branch is changing FileUtils.deleteDirectory to FileUtils.forceDeleteOnExit.

Author: adamtracymartin <atmartin@yahoo.com>

Reviewers: Jia Zhai <zhaijia03@gmail.com>, Sijie Guo <sijie@apache.org>, Leigh
Stewart <lstewart@apache.org>

Closes #116 from adamtracymartin/DL-173

(cherry picked from commit 06ab8216295ea25403534cf9c3b3e1db5683cb77)
Signed-off-by: Sijie Guo <sijie@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/commit/58f18dc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/tree/58f18dc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/diff/58f18dc3

Branch: refs/heads/release-0.4.0-incubating
Commit: 58f18dc36538d86ede1ea82e5c0dde384e00ba22
Parents: 49c31cd
Author: adamtracymartin <atmartin@yahoo.com>
Authored: Wed Apr 12 21:36:19 2017 -0700
Committer: Sijie Guo <sijie@apache.org>
Committed: Wed Apr 12 21:36:32 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/distributedlog/LocalDLMEmulator.java    | 4 ++--
 .../java/org/apache/distributedlog/TestDistributedLogBase.java   | 2 +-
 .../java/org/apache/distributedlog/ZooKeeperClusterTestCase.java | 2 +-
 .../org/apache/distributedlog/service/DistributedLogCluster.java | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/58f18dc3/distributedlog-core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java
----------------------------------------------------------------------
diff --git a/distributedlog-core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java
b/distributedlog-core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java
index 5623525..f2c510d 100644
--- a/distributedlog-core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java
+++ b/distributedlog-core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java
@@ -168,7 +168,7 @@ public class LocalDLMEmulator {
             bkStartupThread.join();
         }
         for (File dir : tmpDirs) {
-            FileUtils.deleteDirectory(dir);
+            FileUtils.forceDeleteOnExit(dir);
         }
     }
 
@@ -344,7 +344,7 @@ public class LocalDLMEmulator {
                 public void run() {
                     try {
                         localDlm.teardown();
-                        FileUtils.deleteDirectory(zkDir);
+                        FileUtils.forceDeleteOnExit(zkDir);
                         System.out.println("ByeBye!");
                     } catch (Exception e) {
                         // do nothing

http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/58f18dc3/distributedlog-core/src/test/java/org/apache/distributedlog/TestDistributedLogBase.java
----------------------------------------------------------------------
diff --git a/distributedlog-core/src/test/java/org/apache/distributedlog/TestDistributedLogBase.java
b/distributedlog-core/src/test/java/org/apache/distributedlog/TestDistributedLogBase.java
index 2769175..a766d3e 100644
--- a/distributedlog-core/src/test/java/org/apache/distributedlog/TestDistributedLogBase.java
+++ b/distributedlog-core/src/test/java/org/apache/distributedlog/TestDistributedLogBase.java
@@ -115,7 +115,7 @@ public class TestDistributedLogBase {
         bkutil.teardown();
         zks.stop();
         for (File dir : tmpDirs) {
-            FileUtils.deleteDirectory(dir);
+            FileUtils.forceDeleteOnExit(dir);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/58f18dc3/distributedlog-core/src/test/java/org/apache/distributedlog/ZooKeeperClusterTestCase.java
----------------------------------------------------------------------
diff --git a/distributedlog-core/src/test/java/org/apache/distributedlog/ZooKeeperClusterTestCase.java
b/distributedlog-core/src/test/java/org/apache/distributedlog/ZooKeeperClusterTestCase.java
index 3eeb870..2b6204d 100644
--- a/distributedlog-core/src/test/java/org/apache/distributedlog/ZooKeeperClusterTestCase.java
+++ b/distributedlog-core/src/test/java/org/apache/distributedlog/ZooKeeperClusterTestCase.java
@@ -47,7 +47,7 @@ public class ZooKeeperClusterTestCase {
     public static void shutdownZooKeeper() throws Exception {
         zks.stop();
         if (null != zkDir) {
-            FileUtils.deleteDirectory(zkDir);
+            FileUtils.forceDeleteOnExit(zkDir);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/58f18dc3/distributedlog-service/src/main/java/org/apache/distributedlog/service/DistributedLogCluster.java
----------------------------------------------------------------------
diff --git a/distributedlog-service/src/main/java/org/apache/distributedlog/service/DistributedLogCluster.java
b/distributedlog-service/src/main/java/org/apache/distributedlog/service/DistributedLogCluster.java
index aadd71e..9cc085d 100644
--- a/distributedlog-service/src/main/java/org/apache/distributedlog/service/DistributedLogCluster.java
+++ b/distributedlog-service/src/main/java/org/apache/distributedlog/service/DistributedLogCluster.java
@@ -333,7 +333,7 @@ public class DistributedLogCluster {
             this.zks.stop();
         }
         for (File dir : tmpDirs) {
-            FileUtils.deleteDirectory(dir);
+            FileUtils.forceDeleteOnExit(dir);
         }
     }
 


Mime
View raw message