You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/11/29 19:00:46 UTC
incubator-systemml git commit: [SYSTEMML-1127] Synchronize creation
of the cache directory
Repository: incubator-systemml
Updated Branches:
refs/heads/master 8e4bdb4ed -> ce71ab16a
[SYSTEMML-1127] Synchronize creation of the cache directory
This fixes a race condition that occurred while initializing the cache
directory on remote spark workers. By synchronizing this, the problem should
be resolved.
Closes #295.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/ce71ab16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/ce71ab16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/ce71ab16
Branch: refs/heads/master
Commit: ce71ab16a4cb99022e0b7274204c14370f4296a2
Parents: 8e4bdb4
Author: fschueler <fe...@ibm.com>
Authored: Tue Nov 29 10:55:06 2016 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Tue Nov 29 10:55:06 2016 -0800
----------------------------------------------------------------------
.../sysml/runtime/controlprogram/parfor/util/IDHandler.java | 5 ++---
src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/ce71ab16/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
index 95edfa3..f494b88 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
@@ -122,9 +122,8 @@ public class IDHandler
//get ip address
InetAddress addr = InetAddress.getLocalHost();
String host = addr.getHostAddress();
- //addr.getHostName()
-
- uuid = pid + "_" + host;
+
+ uuid = pid + "_" + host;
}
catch(Exception ex)
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/ce71ab16/src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java b/src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java
index ffaf613..a7ff9fa 100644
--- a/src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/util/LocalFileUtils.java
@@ -336,7 +336,7 @@ public class LocalFileUtils
return createWorkingDirectoryWithUUID( DMLScript.getUUID() );
}
- public static String createWorkingDirectoryWithUUID( String uuid )
+ public static synchronized String createWorkingDirectoryWithUUID( String uuid )
throws DMLRuntimeException
{
//create local tmp dir if not existing