phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshb...@apache.org
Subject phoenix git commit: PHOENIX-4446 Sequence table region opening failing because of property setting attempt on read-only configuration(Rajeshbabu)
Date Sat, 09 Dec 2017 04:16:30 GMT
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 8dc47e807 -> 4f97569fd


PHOENIX-4446 Sequence table region opening failing because of property setting attempt on
read-only configuration(Rajeshbabu)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 4f97569fde4fa24989e8550eea2d76f52ac462a5
Parents: 8dc47e8
Author: Rajeshbabu Chintaguntla <rajeshbabu@apache.org>
Authored: Sat Dec 9 09:46:09 2017 +0530
Committer: Rajeshbabu Chintaguntla <rajeshbabu@apache.org>
Committed: Sat Dec 9 09:46:09 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/phoenix/hbase/index/write/IndexWriter.java  | 3 ++-
 .../main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java | 5 -----
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java   | 4 +---
 .../org/apache/phoenix/hbase/index/write/TestIndexWriter.java   | 3 ---
 4 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f97569f/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
index 6b57025..4e5e182 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
@@ -33,6 +33,7 @@ import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.exception.IndexWriteException;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
+import org.apache.phoenix.index.PhoenixIndexFailurePolicy;
 
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Multimap;
@@ -88,7 +89,7 @@ public class IndexWriter implements Stoppable {
     Configuration conf = env.getConfiguration();
     try {
       IndexFailurePolicy committer =
-          conf.getClass(INDEX_FAILURE_POLICY_CONF_KEY, KillServerOnFailurePolicy.class,
+          conf.getClass(INDEX_FAILURE_POLICY_CONF_KEY, PhoenixIndexFailurePolicy.class,
             IndexFailurePolicy.class).newInstance();
       return committer;
     } catch (InstantiationException e) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f97569f/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
index 5b76572..f36a9c5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexBuilder.java
@@ -102,11 +102,6 @@ public class PhoenixIndexBuilder extends NonTxIndexBuilder {
     @Override
     public void setup(RegionCoprocessorEnvironment env) throws IOException {
         super.setup(env);
-        Configuration conf = env.getConfiguration();
-        // Install handler that will attempt to disable the index first before killing the
region
-        // server
-        conf.setIfUnset(IndexWriter.INDEX_FAILURE_POLICY_CONF_KEY,
-            PhoenixIndexFailurePolicy.class.getName());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f97569f/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 b852316..82100c8 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
@@ -906,9 +906,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                 }
             } else if (SchemaUtil.isSequenceTable(tableName)) {
                 if(!newDesc.hasCoprocessor(SequenceRegionObserver.class.getName())) {
-                    // Just giving more priority to this coprocessor till HBASE-19384 get's
fixed
-                    // because in HBase 2.0 the bypass is not working as old versions.
-                    builder.addCoprocessor(SequenceRegionObserver.class.getName(), null,
priority + 1, null);
+                    builder.addCoprocessor(SequenceRegionObserver.class.getName(), null,
priority, null);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f97569f/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
index af45dad..642b83e 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
@@ -71,7 +71,6 @@ public class TestIndexWriter {
     assertNotNull(IndexWriter.getCommitter(env));
   }
 
-  @SuppressWarnings("deprecation")
   @Test
   public void getDefaultFailurePolicy() throws Exception {
     Configuration conf = new Configuration(false);
@@ -89,7 +88,6 @@ public class TestIndexWriter {
    * all index writes for a mutation/batch are completed.
    * @throws Exception on failure
    */
-  @SuppressWarnings({ "unchecked", "deprecation" })
   @Test
   public void testSynchronouslyCompletesAllWrites() throws Exception {
     LOG.info("Starting " + testName.getTableNameString());
@@ -143,7 +141,6 @@ public class TestIndexWriter {
    * that we correctly end the task
    * @throws Exception on failure
    */
-  @SuppressWarnings({ "unchecked", "deprecation" })
   @Test
   public void testShutdownInterruptsAsExpected() throws Exception {
     Stoppable stop = Mockito.mock(Stoppable.class);


Mime
View raw message