Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 5e7012340 -> e6723eb11


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/e6723eb1
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e6723eb1
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e6723eb1

Branch: refs/heads/4.x-HBase-1.1
Commit: e6723eb11859ac622f7c633d1e7241bc7e4990a1
Parents: 5e70123
Author: aertoria <[email protected]>
Authored: Wed Aug 16 15:45:27 2017 -0700
Committer: Geoffrey Jacoby <[email protected]>
Committed: Tue Aug 29 21:14:41 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/e6723eb1/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 555ba78..2d8395f 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/e6723eb1/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";

Reply via email to