Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.2 96913e0e2 -> 02acd5c2c
PHOENIX-4080 Amending error message when phoenix client version is not match with servers Signed-off-by: Geoffrey Jacoby <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/02acd5c2 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/02acd5c2 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/02acd5c2 Branch: refs/heads/4.x-HBase-1.2 Commit: 02acd5c2c54de0dbdb02d2dade93d27da62f947c Parents: 96913e0 Author: aertoria <[email protected]> Authored: Wed Aug 16 15:45:27 2017 -0700 Committer: Geoffrey Jacoby <[email protected]> Committed: Tue Aug 29 21:22:16 2017 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 4 ++-- .../src/main/java/org/apache/phoenix/query/QueryConstants.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/02acd5c2/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index cd0487d..c853a70 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -1167,7 +1167,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement } private void checkClientServerCompatibility(byte[] metaTable) throws SQLException { - StringBuilder buf = new StringBuilder("The following servers require an updated " + QueryConstants.DEFAULT_COPROCESS_PATH + " to be put in the classpath of HBase: "); + StringBuilder buf = new StringBuilder("Newer Phoenix clients can't communicate with older Phoenix servers. The following servers require an updated " + QueryConstants.DEFAULT_COPROCESS_JAR_NAME + " to be put in the classpath of HBase: "); boolean isIncompatible = false; int minHBaseVersion = Integer.MAX_VALUE; boolean isTableNamespaceMappingEnabled = false; @@ -1232,7 +1232,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement } catch (Throwable t) { // This is the case if the "phoenix.jar" is not on the classpath of HBase on the region server throw new SQLExceptionInfo.Builder(SQLExceptionCode.INCOMPATIBLE_CLIENT_SERVER_JAR).setRootCause(t) - .setMessage("Ensure that " + QueryConstants.DEFAULT_COPROCESS_PATH + " is put on the classpath of HBase in every region server: " + t.getMessage()) + .setMessage("Ensure that " + QueryConstants.DEFAULT_COPROCESS_JAR_NAME + " is put on the classpath of HBase in every region server: " + t.getMessage()) .build().buildException(); } finally { if (ht != null) { http://git-wip-us.apache.org/repos/asf/phoenix/blob/02acd5c2/phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java index e74f412..e7487a1 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java @@ -196,6 +196,8 @@ public interface QueryConstants { public static final byte[] DESC_SEPARATOR_BYTE_ARRAY = new byte[] {DESC_SEPARATOR_BYTE}; public static final String DEFAULT_COPROCESS_PATH = "phoenix.jar"; + public static final String DEFAULT_COPROCESS_JAR_NAME = "phoenix-[version]-server.jar"; + public final static int MILLIS_IN_DAY = 1000 * 60 * 60 * 24; public static final String EMPTY_COLUMN_NAME = "_0";
