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 2016/10/20 17:44:19 UTC
flink git commit: [FLINK-4857] Remove throws clause from
ZooKeeperUtils functions
Repository: flink
Updated Branches:
refs/heads/master 1e475c768 -> 6f0faf9bb
[FLINK-4857] Remove throws clause from ZooKeeperUtils functions
Remove the unnecessary throws clauses from all ZooKeeperUtils' functions which don't
throw an actual exception.
This closes #2659.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/6f0faf9b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/6f0faf9b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/6f0faf9b
Branch: refs/heads/master
Commit: 6f0faf9bb35e7cac3a38ed792cdabd6400fc4c79
Parents: 1e475c7
Author: Till Rohrmann <tr...@apache.org>
Authored: Wed Oct 19 14:23:47 2016 +0200
Committer: Till Rohrmann <tr...@apache.org>
Committed: Thu Oct 20 19:38:15 2016 +0200
----------------------------------------------------------------------
.../checkpoint/ZooKeeperCheckpointIDCounter.java | 3 +--
.../apache/flink/runtime/util/StandaloneUtils.java | 2 +-
.../apache/flink/runtime/util/ZooKeeperUtils.java | 15 +++++++--------
3 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/6f0faf9b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
index 80e79b2..7d15fab 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java
@@ -71,9 +71,8 @@ public class ZooKeeperCheckpointIDCounter implements CheckpointIDCounter {
*
* @param client Curator ZooKeeper client
* @param counterPath ZooKeeper path for the counter. It's sufficient to have a path per-job.
- * @throws Exception
*/
- public ZooKeeperCheckpointIDCounter(CuratorFramework client, String counterPath) throws Exception {
+ public ZooKeeperCheckpointIDCounter(CuratorFramework client, String counterPath) {
this.client = checkNotNull(client, "Curator client");
this.counterPath = checkNotNull(counterPath, "Counter path");
this.sharedCount = new SharedCount(client, counterPath, 1);
http://git-wip-us.apache.org/repos/asf/flink/blob/6f0faf9b/flink-runtime/src/main/java/org/apache/flink/runtime/util/StandaloneUtils.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/StandaloneUtils.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/StandaloneUtils.java
index 8bc1ad1..8998add 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/StandaloneUtils.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/StandaloneUtils.java
@@ -57,7 +57,7 @@ public final class StandaloneUtils {
* @param configuration Configuration instance containing hte host and port information
* @param jobManagerName Name of the JobManager actor
* @return StandaloneLeaderRetrievalService
- * @throws UnknownHostException
+ * @throws UnknownHostException if the host name cannot be resolved into an {@link InetAddress}
*/
public static StandaloneLeaderRetrievalService createLeaderRetrievalService(
Configuration configuration,
http://git-wip-us.apache.org/repos/asf/flink/blob/6f0faf9b/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
index 7862f87..a9887a6 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
@@ -158,10 +158,9 @@ public class ZooKeeperUtils {
*
* @param configuration {@link Configuration} object containing the configuration values
* @return {@link ZooKeeperLeaderRetrievalService} instance.
- * @throws Exception
*/
public static ZooKeeperLeaderRetrievalService createLeaderRetrievalService(
- Configuration configuration) throws Exception {
+ Configuration configuration) {
CuratorFramework client = startCuratorFramework(configuration);
String leaderPath = ConfigurationUtil.getStringWithDeprecatedKeys(
configuration,
@@ -178,10 +177,9 @@ public class ZooKeeperUtils {
*
* @param configuration {@link Configuration} object containing the configuration values
* @return {@link ZooKeeperLeaderElectionService} instance.
- * @throws Exception
*/
public static ZooKeeperLeaderElectionService createLeaderElectionService(
- Configuration configuration) throws Exception {
+ Configuration configuration) {
CuratorFramework client = startCuratorFramework(configuration);
@@ -194,11 +192,10 @@ public class ZooKeeperUtils {
* @param client The {@link CuratorFramework} ZooKeeper client to use
* @param configuration {@link Configuration} object containing the configuration values
* @return {@link ZooKeeperLeaderElectionService} instance.
- * @throws Exception
*/
public static ZooKeeperLeaderElectionService createLeaderElectionService(
CuratorFramework client,
- Configuration configuration) throws Exception {
+ Configuration configuration) {
String latchPath = ConfigurationUtil.getStringWithDeprecatedKeys(
configuration,
@@ -220,6 +217,7 @@ public class ZooKeeperUtils {
* @param client The {@link CuratorFramework} ZooKeeper client to use
* @param configuration {@link Configuration} object
* @return {@link ZooKeeperSubmittedJobGraphStore} instance
+ * @throws Exception if the submitted job graph store cannot be created
*/
public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs(
CuratorFramework client,
@@ -248,6 +246,7 @@ public class ZooKeeperUtils {
* @param jobId ID of job to create the instance for
* @param maxNumberOfCheckpointsToRetain The maximum number of checkpoints to retain
* @return {@link ZooKeeperCompletedCheckpointStore} instance
+ * @throws Exception if the completed checkpoint store cannot be created
*/
public static CompletedCheckpointStore createCompletedCheckpoints(
CuratorFramework client,
@@ -287,7 +286,7 @@ public class ZooKeeperUtils {
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter(
CuratorFramework client,
Configuration configuration,
- JobID jobId) throws Exception {
+ JobID jobId) {
String checkpointIdCounterPath = ConfigurationUtil.getStringWithDeprecatedKeys(
configuration,
@@ -307,7 +306,7 @@ public class ZooKeeperUtils {
* @param prefix Prefix for the created files
* @param <T> Type of the state objects
* @return {@link FileSystemStateStorageHelper} instance
- * @throws IOException
+ * @throws IOException if file system state storage cannot be created
*/
public static <T extends Serializable> FileSystemStateStorageHelper<T> createFileSystemStateStorage(
Configuration configuration,