flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [3/3] flink git commit: Change Validation Exception to LOG.warn() in FsStateBackend
Date Tue, 05 Jul 2016 11:50:37 GMT
Change Validation Exception to LOG.warn() in FsStateBackend

Before, job would fail with an exception if the checkpoint filesystem
was not accessible from the client. This is preventing some correct jobs
from running.

Now, only print a warning.

This closes #2157


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

Branch: refs/heads/master
Commit: 5c0c7e36e8984dfd29224389212d2d04e24b4c8b
Parents: 989c67a
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Tue Jul 5 10:37:08 2016 +0200
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Tue Jul 5 13:46:22 2016 +0200

----------------------------------------------------------------------
 .../runtime/state/filesystem/FsStateBackend.java  | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/5c0c7e36/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
index f4de48c..8a8a26d 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
@@ -386,7 +386,12 @@ public class FsStateBackend extends AbstractStateBackend {
 			// try to grab the file system for this path/URI
 			FileSystem filesystem = FileSystem.get(checkpointDataUri);
 			if (filesystem == null) {
-				throw new IOException("Could not find a file system for the given scheme in the available
configurations.");
+				String reason = "Could not find a file system for the given scheme in" +
+				"the available configurations.";
+				LOG.warn("Could not verify checkpoint path. This might be caused by a genuine " +
+						"problem or by the fact that the file system is not accessible from the " +
+						"client. Reason:{}", reason);
+				return new Path(checkpointDataUri);
 			}
 
 			URI fsURI = filesystem.getUri();
@@ -394,9 +399,14 @@ public class FsStateBackend extends AbstractStateBackend {
 				URI baseURI = new URI(fsURI.getScheme(), fsURI.getAuthority(), path, null, null);
 				return new Path(baseURI);
 			} catch (URISyntaxException e) {
-				throw new IOException(
-					String.format("Cannot create file system URI for checkpointDataUri %s and filesystem
URI %s",
-						checkpointDataUri, fsURI), e);
+				String reason = String.format(
+						"Cannot create file system URI for checkpointDataUri %s and filesystem URI %s: " +
e.toString(),
+						checkpointDataUri,
+						fsURI);
+				LOG.warn("Could not verify checkpoint path. This might be caused by a genuine " +
+						"problem or by the fact that the file system is not accessible from the " +
+						"client. Reason: {}", reason);
+				return new Path(checkpointDataUri);
 			}
 		}
 	}


Mime
View raw message