You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2017/02/20 01:08:28 UTC

[2/2] flink git commit: [FLINK-5828] [distributed runtime] Fix initialization of Blob storage directories

[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: \u58eb\u8fdc <bo...@alipay.com>
Authored: Fri Feb 17 17:42:22 2017 +0800
Committer: Stephan Ewen <se...@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() + "'.");
 		}