Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 ed1208bad -> fcc9904d2
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/fcc9904d Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/fcc9904d Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/fcc9904d Branch: refs/heads/4.x-HBase-0.98 Commit: fcc9904d2a84ac2283f8554c0d0ab21f18c88700 Parents: ed1208b Author: aertoria <[email protected]> Authored: Wed Aug 16 15:45:27 2017 -0700 Committer: Geoffrey Jacoby <[email protected]> Committed: Tue Aug 29 21:11: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/fcc9904d/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 382fb57..aca0904 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 @@ -1169,7 +1169,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; @@ -1234,7 +1234,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/fcc9904d/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";
