flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/2] flink git commit: [FLINK-5828] [distributed runtime] Fix initialization of Blob storage directories
Date Mon, 20 Feb 2017 01:08:28 GMT
[FLINK-5828] [distributed runtime] Fix initialization of Blob storage directories

Flip the logic (check existence and create directory) to resolve currency problem

This closes #3342


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8a5d56d4
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8a5d56d4
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8a5d56d4

Branch: refs/heads/release-1.2
Commit: 8a5d56d448db752c9779a32d5a6f907b0232b489
Parents: b21f9d1
Author: 士远 <bowen.zheng@alipay.com>
Authored: Fri Feb 17 17:42:22 2017 +0800
Committer: Stephan Ewen <sewen@apache.org>
Committed: Mon Feb 20 02:07:54 2017 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/runtime/blob/BlobUtils.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8a5d56d4/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
index e74fa6f..a8cee2e 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
@@ -124,7 +124,7 @@ public class BlobUtils {
 	private static File getCacheDirectory(File storageDir) {
 		final File cacheDirectory = new File(storageDir, "cache");
 
-		if (!cacheDirectory.exists() && !cacheDirectory.mkdirs()) {
+		if (!cacheDirectory.mkdirs() && !cacheDirectory.exists()) {
 			throw new RuntimeException("Could not create cache directory '" + cacheDirectory.getAbsolutePath()
+ "'.");
 		}
 


Mime
View raw message