ChinmaySKulkarni commented on a change in pull request #676: PHOENIX-5636: 
Improve the error message when client connects to server with higher major 
version
URL: https://github.com/apache/phoenix/pull/676#discussion_r383455771
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/util/MetaDataUtil.java
 ##########
 @@ -122,7 +123,38 @@
             ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS,
             ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE);
 
-    public static boolean areClientAndServerCompatible(long 
serverHBaseAndPhoenixVersion) {
+    public static class ClientServerCompatibility {
+
+        long serverVersion;
+        StringBuilder errorCode;
+        boolean isCompatible;
+
+        ClientServerCompatibility(long serverVersion) {
+            this.serverVersion = serverVersion;
+            this.errorCode = new StringBuilder();
+            this.isCompatible = true;
+        }
+
+        public int getErrorCode() {
+            int errorCode;
+            try {
+                errorCode = Integer.parseInt(this.errorCode.toString());
 
 Review comment:
   I don't understand why we are converting this to string. Do we need to store 
the error code as a string for some reason?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to