[FLINK-6819] Activate checkstyle for runtime/leaderretrieval This closes #4053.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/22290ddc Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/22290ddc Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/22290ddc Branch: refs/heads/master Commit: 22290ddcca607ab4e06b136d463994b503d2dd16 Parents: c3ab799 Author: zentol <[email protected]> Authored: Thu Jun 1 12:27:28 2017 +0200 Committer: zentol <[email protected]> Committed: Fri Jun 2 22:21:48 2017 +0200 ---------------------------------------------------------------------- flink-runtime/pom.xml | 1 - .../runtime/leaderretrieval/LeaderRetrievalService.java | 4 ++-- .../leaderretrieval/StandaloneLeaderRetrievalService.java | 10 +++++----- .../leaderretrieval/ZooKeeperLeaderRetrievalService.java | 7 ++++--- 4 files changed, 11 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/22290ddc/flink-runtime/pom.xml ---------------------------------------------------------------------- diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml index 67d8486..77dfeeb 100644 --- a/flink-runtime/pom.xml +++ b/flink-runtime/pom.xml @@ -442,7 +442,6 @@ under the License. **/runtime/jobmanager/**, **/runtime/jobmaster/**, **/runtime/leaderelection/**, - **/runtime/leaderretrieval/**, **/runtime/memory/**, **/runtime/messages/**, **/runtime/minicluster/**, http://git-wip-us.apache.org/repos/asf/flink/blob/22290ddc/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/LeaderRetrievalService.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/LeaderRetrievalService.java b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/LeaderRetrievalService.java index 97f8843..d52abd2 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/LeaderRetrievalService.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/LeaderRetrievalService.java @@ -22,11 +22,11 @@ package org.apache.flink.runtime.leaderretrieval; * This interface has to be implemented by a service which retrieves the current leader and notifies * a listener about it. * - * Prior to using this service it has to be started by calling the start method. The start method + * <p>Prior to using this service it has to be started by calling the start method. The start method * also takes the {@link LeaderRetrievalListener} as an argument. The service can only be started * once. * - * The service should be stopped by calling the stop method. + * <p>The service should be stopped by calling the stop method. */ public interface LeaderRetrievalService { http://git-wip-us.apache.org/repos/asf/flink/blob/22290ddc/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/StandaloneLeaderRetrievalService.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/StandaloneLeaderRetrievalService.java b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/StandaloneLeaderRetrievalService.java index fefe910..b039262 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/StandaloneLeaderRetrievalService.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/StandaloneLeaderRetrievalService.java @@ -30,21 +30,21 @@ import static org.apache.flink.util.Preconditions.checkState; * assumes that there is only a single contender for leadership * (e.g., a single JobManager or ResourceManager process) and that this process is * reachable under a constant address. - * + * * <p>As soon as this service is started, it immediately notifies the leader listener * of the leader contender with the pre-configured address. */ public class StandaloneLeaderRetrievalService implements LeaderRetrievalService { private final Object startStopLock = new Object(); - - /** The fix address of the leader */ + + /** The fix address of the leader. */ private final String leaderAddress; - /** The fix leader ID (leader lock fencing token) */ + /** The fix leader ID (leader lock fencing token). */ private final UUID leaderId; - /** Flag whether this service is started */ + /** Flag whether this service is started. */ private boolean started; /** http://git-wip-us.apache.org/repos/asf/flink/blob/22290ddc/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java index 7f18fd9..c60fe2c 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java @@ -19,6 +19,7 @@ package org.apache.flink.runtime.leaderretrieval; import org.apache.flink.util.Preconditions; + import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; import org.apache.curator.framework.recipes.cache.NodeCache; @@ -46,13 +47,13 @@ public class ZooKeeperLeaderRetrievalService implements LeaderRetrievalService, private final Object lock = new Object(); - /** Connection to the used ZooKeeper quorum */ + /** Connection to the used ZooKeeper quorum. */ private final CuratorFramework client; - /** Curator recipe to watch changes of a specific ZooKeeper node */ + /** Curator recipe to watch changes of a specific ZooKeeper node. */ private final NodeCache cache; - /** Listener which will be notified about leader changes */ + /** Listener which will be notified about leader changes. */ private volatile LeaderRetrievalListener leaderListener; private String lastLeaderAddress;
