You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/02/14 12:56:19 UTC

[7/8] flink git commit: [FLINK-8576][QS] Reduce verbosity when classes can't be found

[FLINK-8576][QS] Reduce verbosity when classes can't be found

This closes #5420.


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

Branch: refs/heads/master
Commit: e7f4f53c131d919db1073adedbfa487118cc0ab6
Parents: 07bd44b
Author: zentol <ch...@apache.org>
Authored: Wed Feb 7 10:31:41 2018 +0100
Committer: zentol <ch...@apache.org>
Committed: Wed Feb 14 12:28:52 2018 +0100

----------------------------------------------------------------------
 .../flink/runtime/query/QueryableStateUtils.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/e7f4f53c/flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateUtils.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateUtils.java b/flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateUtils.java
index c3f83447..0b4d448 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateUtils.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/query/QueryableStateUtils.java
@@ -36,6 +36,10 @@ public final class QueryableStateUtils {
 
 	private static final Logger LOG = LoggerFactory.getLogger(QueryableStateUtils.class);
 
+	private static final String ERROR_MESSAGE_ON_LOAD_FAILURE =
+		"Probable reason: flink-queryable-state-runtime is not in the classpath. " +
+		"To enable Queryable State, please move the flink-queryable-state-runtime jar from the opt to the lib folder.";
+
 	/**
 	 * Initializes the {@link KvStateClientProxy client proxy} responsible for
 	 * receiving requests from the external (to the cluster) client and forwarding them internally.
@@ -73,11 +77,9 @@ public final class QueryableStateUtils {
 					KvStateRequestStats.class);
 			return constructor.newInstance(address, ports, eventLoopThreads, queryThreads, stats);
 		} catch (ClassNotFoundException e) {
-			final String msg = "Could not load Queryable State Client Proxy. " +
-				"Probable reason: flink-queryable-state-runtime is not in the classpath. " +
-				"Please put the corresponding jar from the opt to the lib folder.";
+			final String msg = "Could not load Queryable State Client Proxy. " + ERROR_MESSAGE_ON_LOAD_FAILURE;
 			if (LOG.isDebugEnabled()) {
-				LOG.debug(msg, e);
+				LOG.debug(msg + " Cause: " + e.getMessage());
 			} else {
 				LOG.info(msg);
 			}
@@ -132,11 +134,9 @@ public final class QueryableStateUtils {
 					KvStateRequestStats.class);
 			return constructor.newInstance(address, ports, eventLoopThreads, queryThreads, kvStateRegistry, stats);
 		} catch (ClassNotFoundException e) {
-			final String msg = "Could not load Queryable State Server. " +
-				"Probable reason: flink-queryable-state-runtime is not in the classpath. " +
-				"Please put the corresponding jar from the opt to the lib folder.";
+			final String msg = "Could not load Queryable State Server. " + ERROR_MESSAGE_ON_LOAD_FAILURE;
 			if (LOG.isDebugEnabled()) {
-				LOG.debug(msg, e);
+				LOG.debug(msg + " Cause: " + e.getMessage());
 			} else {
 				LOG.info(msg);
 			}