You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/03/29 16:09:44 UTC

[4/6] flink git commit: [hotfix] Correct JavaDocs in SubmittedJobGraphStore and add Nullable annotation

[hotfix] Correct JavaDocs in SubmittedJobGraphStore and add Nullable annotation


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

Branch: refs/heads/release-1.5
Commit: ea59b6b1f9d6222658e6cf658b3f1ade81a976b4
Parents: f3775b4
Author: Till Rohrmann <tr...@apache.org>
Authored: Tue Mar 27 10:00:56 2018 +0200
Committer: Till Rohrmann <tr...@apache.org>
Committed: Thu Mar 29 18:09:21 2018 +0200

----------------------------------------------------------------------
 .../flink/runtime/jobmanager/SubmittedJobGraphStore.java     | 8 +++++---
 .../runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java  | 5 ++++-
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ea59b6b1/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/SubmittedJobGraphStore.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/SubmittedJobGraphStore.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/SubmittedJobGraphStore.java
index 6e91f80..7e624ec 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/SubmittedJobGraphStore.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/SubmittedJobGraphStore.java
@@ -20,6 +20,8 @@ package org.apache.flink.runtime.jobmanager;
 
 import org.apache.flink.api.common.JobID;
 
+import javax.annotation.Nullable;
+
 import java.util.Collection;
 
 /**
@@ -38,10 +40,10 @@ public interface SubmittedJobGraphStore {
 	void stop() throws Exception;
 
 	/**
-	 * Returns the {@link SubmittedJobGraph} with the given {@link JobID}.
-	 *
-	 * <p>An Exception is thrown, if no job graph with the given ID exists.
+	 * Returns the {@link SubmittedJobGraph} with the given {@link JobID} or
+	 * {@code null} if no job was registered.
 	 */
+	@Nullable
 	SubmittedJobGraph recoverJobGraph(JobID jobId) throws Exception;
 
 	/**

http://git-wip-us.apache.org/repos/asf/flink/blob/ea59b6b1/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java
index dfa931b..7ba5d48 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/ZooKeeperSubmittedJobGraphStore.java
@@ -33,6 +33,8 @@ import org.apache.zookeeper.KeeperException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.annotation.Nullable;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -158,6 +160,7 @@ public class ZooKeeperSubmittedJobGraphStore implements SubmittedJobGraphStore {
 	}
 
 	@Override
+	@Nullable
 	public SubmittedJobGraph recoverJobGraph(JobID jobId) throws Exception {
 		checkNotNull(jobId, "Job ID");
 		final String path = getPathForJob(jobId);
@@ -179,7 +182,7 @@ public class ZooKeeperSubmittedJobGraphStore implements SubmittedJobGraphStore {
 					return null;
 				} catch (Exception e) {
 					throw new FlinkException("Could not retrieve the submitted job graph state handle " +
-						"for " + path + "from the submitted job graph store.", e);
+						"for " + path + " from the submitted job graph store.", e);
 				}
 				SubmittedJobGraph jobGraph;