This is an automated email from the ASF dual-hosted git repository.
skadam pushed a commit to branch 4.14-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.14-HBase-1.3 by this push:
new 1eca377 PHOENIX-5359: Remove (Global-Indexing)new coprocessors in
CQSI#addCoprocessors with flag(INDEX_REGION_OBSERVER_ENABLED_ATTRIB) disabled
1eca377 is described below
commit 1eca377f713036e83ec4c9ecf345a70b44eb3b82
Author: s.kadam <[email protected]>
AuthorDate: Wed Jun 26 19:43:14 2019 -0700
PHOENIX-5359: Remove (Global-Indexing)new coprocessors in
CQSI#addCoprocessors with flag(INDEX_REGION_OBSERVER_ENABLED_ATTRIB) disabled
---
.../apache/phoenix/query/ConnectionQueryServicesImpl.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
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 72aaa41..4531c45 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
@@ -850,12 +850,14 @@ public class ConnectionQueryServicesImpl extends
DelegateQueryServices implement
boolean isTransactional =
Boolean.TRUE.equals(tableProps.get(TableProperty.TRANSACTIONAL.name())) ||
nonTxToTx;
- boolean globalIndexerEnabled = config.getBoolean(
+ boolean indexRegionObserverEnabled = config.getBoolean(
QueryServices.INDEX_REGION_OBSERVER_ENABLED_ATTRIB,
QueryServicesOptions.DEFAULT_INDEX_REGION_OBSERVER_ENABLED);
if (tableType == PTableType.INDEX && !isTransactional) {
- if (globalIndexerEnabled &&
!descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) {
+ if (!indexRegionObserverEnabled &&
descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) {
+
descriptor.removeCoprocessor(GlobalIndexChecker.class.getName());
+ } else if (indexRegionObserverEnabled &&
!descriptor.hasCoprocessor(GlobalIndexChecker.class.getName())) {
descriptor.addCoprocessor(GlobalIndexChecker.class.getName(), null, priority -
1, null);
}
}
@@ -897,7 +899,10 @@ public class ConnectionQueryServicesImpl extends
DelegateQueryServices implement
if
(descriptor.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) {
descriptor.removeCoprocessor(PhoenixTransactionalIndexer.class.getName());
}
- if (globalIndexerEnabled) {
+ if (indexRegionObserverEnabled) {
+ if
(descriptor.hasCoprocessor(Indexer.class.getName())) {
+
descriptor.removeCoprocessor(Indexer.class.getName());
+ }
if
(!descriptor.hasCoprocessor(IndexRegionObserver.class.getName())) {
Map<String, String> opts =
Maps.newHashMapWithExpectedSize(1);
opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY,
PhoenixIndexCodec.class.getName());
@@ -905,6 +910,9 @@ public class ConnectionQueryServicesImpl extends
DelegateQueryServices implement
}
} else {
+ if
(descriptor.hasCoprocessor(IndexRegionObserver.class.getName())) {
+
descriptor.removeCoprocessor(IndexRegionObserver.class.getName());
+ }
if
(!descriptor.hasCoprocessor(Indexer.class.getName())) {
Map<String, String> opts =
Maps.newHashMapWithExpectedSize(1);
opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY,
PhoenixIndexCodec.class.getName());