You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sa...@apache.org on 2016/11/22 02:54:10 UTC

[06/36] phoenix git commit: PHOENIX-3481 Phoenix initialization fails for HBase 0.98.21 and beyond

PHOENIX-3481 Phoenix initialization fails for HBase 0.98.21 and beyond


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

Branch: refs/heads/encodecolumns2
Commit: 298f7c714fda2ff8a49026482093c242b30d8eb5
Parents: 9c367e2
Author: Samarth <sa...@salesforce.com>
Authored: Tue Nov 15 10:40:45 2016 -0800
Committer: Samarth <sa...@salesforce.com>
Committed: Tue Nov 15 10:40:45 2016 -0800

----------------------------------------------------------------------
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 +--------
 .../src/main/java/org/apache/phoenix/util/ServerUtil.java   | 5 +++++
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/298f7c71/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 3405564..78d9b14 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
@@ -1073,14 +1073,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                      * brought down.
                      */
                     newDesc.setValue(HTableDescriptor.SPLIT_POLICY, MetaDataSplitPolicy.class.getName());
-                    if (allowOnlineTableSchemaUpdate()) {
-                        // No need to wait/poll for this update
-                        admin.modifyTable(physicalTable, newDesc);
-                    } else {
-                        admin.disableTable(physicalTable);
-                        admin.modifyTable(physicalTable, newDesc);
-                        admin.enableTable(physicalTable);
-                    }
+                    modifyTable(tableName, newDesc, true);
                 }
                 return null;
             } else {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/298f7c71/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
index ea0ebea..6e2bbba 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
@@ -25,6 +25,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.HTablePool;
@@ -34,6 +35,7 @@ import org.apache.phoenix.exception.PhoenixIOException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.hbase.index.util.VersionUtil;
+import org.apache.phoenix.schema.StaleRegionBoundaryCacheException;
 
 
 @SuppressWarnings("deprecation")
@@ -113,6 +115,9 @@ public class ServerUtil {
     
     public static SQLException parseServerExceptionOrNull(Throwable t) {
         while (t.getCause() != null) {
+            if (t instanceof NotServingRegionException) {
+                return parseRemoteException(new StaleRegionBoundaryCacheException());
+            }
             t = t.getCause();
         }
         return parseRemoteException(t);