flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [04/10] flink git commit: [hotfix] Fix checkstyle violations in RpcEndpoint
Date Sat, 24 Feb 2018 11:32:43 GMT
[hotfix] Fix checkstyle violations in RpcEndpoint


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

Branch: refs/heads/master
Commit: bb306b9d89e41ae0e32bedecacfece25f7a87d3d
Parents: 6868cac
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Thu Feb 15 18:22:21 2018 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Fri Feb 23 18:22:07 2018 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/rpc/RpcEndpoint.java   | 33 ++++++++++----------
 1 file changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/bb306b9d/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
index 9c2ed83..d269e84 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java
@@ -20,6 +20,7 @@ package org.apache.flink.runtime.rpc;
 
 import org.apache.flink.api.common.time.Time;
 import org.apache.flink.util.Preconditions;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,17 +38,15 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
 
 /**
  * Base class for RPC endpoints. Distributed components which offer remote procedure calls
have to
- * extend the RPC endpoint base class. An RPC endpoint is backed by an {@link RpcService}.

- * 
+ * extend the RPC endpoint base class. An RPC endpoint is backed by an {@link RpcService}.
+ *
  * <h1>Endpoint and Gateway</h1>
- * 
  * To be done...
- * 
  * <h1>Single Threaded Endpoint Execution </h1>
- * 
+ *
  * <p>All RPC calls on the same endpoint are called by the same thread
  * (referred to as the endpoint's <i>main thread</i>).
- * Thus, by executing all state changing operations within the main 
+ * Thus, by executing all state changing operations within the main
  * thread, we don't have to reason about concurrent accesses, in the same way in the Actor
Model
  * of Erlang or Akka.
  *
@@ -60,16 +59,16 @@ public abstract class RpcEndpoint implements RpcGateway {
 
 	// ------------------------------------------------------------------------
 
-	/** RPC service to be used to start the RPC server and to obtain rpc gateways */
+	/** RPC service to be used to start the RPC server and to obtain rpc gateways. */
 	private final RpcService rpcService;
 
-	/** Unique identifier for this rpc endpoint */
+	/** Unique identifier for this rpc endpoint. */
 	private final String endpointId;
 
-	/** Interface to access the underlying rpc server */
+	/** Interface to access the underlying rpc server. */
 	protected final RpcServer rpcServer;
 
-	/** A reference to the endpoint's main thread, if the current method is called by the main
thread */
+	/** A reference to the endpoint's main thread, if the current method is called by the main
thread. */
 	final AtomicReference<Thread> currentMainThread = new AtomicReference<>(null);
 
 	/** The main thread executor to be used to execute future callbacks in the main thread
@@ -78,7 +77,7 @@ public abstract class RpcEndpoint implements RpcGateway {
 
 	/**
 	 * Initializes the RPC endpoint.
-	 * 
+	 *
 	 * @param rpcService The RPC server that dispatches calls to this RPC endpoint.
 	 * @param endpointId Unique identifier for this endpoint
 	 */
@@ -117,7 +116,7 @@ public abstract class RpcEndpoint implements RpcGateway {
 	 * Starts the rpc endpoint. This tells the underlying rpc server that the rpc endpoint is
ready
 	 * to process remote procedure calls.
 	 *
-	 * IMPORTANT: Whenever you override this method, call the parent implementation to enable
+	 * <p>IMPORTANT: Whenever you override this method, call the parent implementation
to enable
 	 * rpc processing. It is advised to make the parent call last.
 	 *
 	 * @throws Exception indicating that something went wrong while starting the RPC endpoint
@@ -140,7 +139,7 @@ public abstract class RpcEndpoint implements RpcGateway {
 	 * <p>This method is called when the RpcEndpoint is being shut down. The method is
guaranteed
 	 * to be executed in the main thread context and can be used to clean up internal state.
 	 *
-	 * IMPORTANT: This method should never be called directly by the user.
+	 * <p>IMPORTANT: This method should never be called directly by the user.
 	 *
 	 * @throws Exception if an error occurs. The exception is returned as result of the termination
future.
 	 */
@@ -288,15 +287,15 @@ public abstract class RpcEndpoint implements RpcGateway {
 
 	/**
 	 * Validates that the method call happens in the RPC endpoint's main thread.
-	 * 
+	 *
 	 * <p><b>IMPORTANT:</b> This check only happens when assertions are enabled,
 	 * such as when running tests.
-	 * 
+	 *
 	 * <p>This can be used for additional checks, like
 	 * <pre>{@code
 	 * protected void concurrencyCriticalMethod() {
 	 *     validateRunsInMainThread();
-	 *     
+	 *
 	 *     // some critical stuff
 	 * }
 	 * }</pre>
@@ -308,7 +307,7 @@ public abstract class RpcEndpoint implements RpcGateway {
 	// ------------------------------------------------------------------------
 	//  Utilities
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Executor which executes runnables in the main thread context.
 	 */


Mime
View raw message