apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vro...@apache.org
Subject [43/50] [abbrv] incubator-apex-core git commit: APEX-120 #comment using different check point location
Date Thu, 24 Sep 2015 02:38:02 GMT
APEX-120 #comment using different check point location


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/2c081b45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/2c081b45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/2c081b45

Branch: refs/heads/feature-module
Commit: 2c081b45ebf4c57b66075a993f53fa721aa45c93
Parents: 7503dde
Author: Gaurav <gaurav@datatorrent.com>
Authored: Tue Sep 15 09:35:50 2015 -0700
Committer: Gaurav <gaurav@datatorrent.com>
Committed: Thu Sep 17 16:40:32 2015 -0700

----------------------------------------------------------------------
 .../java/com/datatorrent/common/util/AsyncFSStorageAgent.java   | 5 ++---
 .../com/datatorrent/common/util/AsyncFSStorageAgentTest.java    | 1 -
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/2c081b45/common/src/main/java/com/datatorrent/common/util/AsyncFSStorageAgent.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/com/datatorrent/common/util/AsyncFSStorageAgent.java b/common/src/main/java/com/datatorrent/common/util/AsyncFSStorageAgent.java
index 374917a..3965925 100644
--- a/common/src/main/java/com/datatorrent/common/util/AsyncFSStorageAgent.java
+++ b/common/src/main/java/com/datatorrent/common/util/AsyncFSStorageAgent.java
@@ -21,6 +21,7 @@
 package com.datatorrent.common.util;
 
 import java.io.*;
+import java.nio.file.Files;
 import java.util.EnumSet;
 
 import org.apache.hadoop.conf.Configuration;
@@ -49,9 +50,7 @@ public class AsyncFSStorageAgent extends FSStorageAgent
   {
     super(path, conf);
     try {
-      File tempFile = File.createTempFile("msp", "msp");
-      this.localBasePath = new File(tempFile.getParent(), "localcheckpoint").getAbsolutePath();
-      tempFile.delete();
+      this.localBasePath = Files.createTempDirectory("chkp").toString();
     } catch (IOException ex) {
       throw new RuntimeException(ex);
     }

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/2c081b45/common/src/test/java/com/datatorrent/common/util/AsyncFSStorageAgentTest.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/com/datatorrent/common/util/AsyncFSStorageAgentTest.java
b/common/src/test/java/com/datatorrent/common/util/AsyncFSStorageAgentTest.java
index 892d221..a1504e4 100644
--- a/common/src/test/java/com/datatorrent/common/util/AsyncFSStorageAgentTest.java
+++ b/common/src/test/java/com/datatorrent/common/util/AsyncFSStorageAgentTest.java
@@ -63,7 +63,6 @@ public class AsyncFSStorageAgentTest
     {
       try {
         FileUtils.deleteDirectory(new File("target/" + description.getClassName()));
-        FileUtils.deleteDirectory(new File(FileUtils.getTempDirectory(), "localcheckpoint"));
       } catch (IOException e) {
         throw new RuntimeException(e);
       }


Mime
View raw message