You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2021/09/10 03:52:34 UTC
[phoenix] branch 4.x updated: PHOENIX-6540 Drop Hbase 1.3 support
from 4.x branch
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x by this push:
new cc32ab0 PHOENIX-6540 Drop Hbase 1.3 support from 4.x branch
cc32ab0 is described below
commit cc32ab0e63e21a01834064d2a9492609ad95a0c4
Author: Istvan Toth <st...@apache.org>
AuthorDate: Thu Sep 9 18:56:11 2021 +0200
PHOENIX-6540 Drop Hbase 1.3 support from 4.x branch
Revert "PHOENIX-5721 Unify 4.x branches (add HBase 1.3)"
This reverts commit a0cff1744bb76a6fc1b79a3aa43859418adb8850.
Fix conflicts with newer code from revert
---
phoenix-core/pom.xml | 15 --
.../ipc/controller/ClientRpcControllerFactory.java | 19 ++-
.../hbase/ipc/controller/IndexRpcController.java | 8 +-
...InterRegionServerIndexRpcControllerFactory.java | 21 ++-
...erRegionServerMetadataRpcControllerFactory.java | 19 ++-
.../ipc/controller/MetadataRpcController.java | 8 +-
.../regionserver/IndexHalfStoreFileReader.java | 22 +--
.../regionserver/LocalIndexStoreFileScanner.java | 4 +-
.../DelegateRegionCoprocessorEnvironment.java | 9 +-
.../phoenix/coprocessor/PagedRegionScanner.java | 3 +-
.../org/apache/phoenix/execute/DelegateHTable.java | 26 ++-
.../apache/phoenix/index/GlobalIndexChecker.java | 18 +--
.../phoenix/iterate/ScanningResultIterator.java | 6 +-
.../apache/phoenix/iterate/SnapshotScanner.java | 8 +-
.../phoenix/monitoring/GlobalClientMetrics.java | 44 ++++-
.../monitoring/GlobalClientMetricsRegistry.java | 49 ------
.../monitoring/GlobalMetricRegistriesAdapter.java | 22 +--
.../phoenix/schema/stats/UpdateStatisticsTool.java | 14 +-
.../phoenix/transaction/OmidTransactionTable.java | 8 +-
.../coprocessor/TaskMetaDataEndpointTest.java | 9 +-
.../java/org/apache/phoenix/query/BaseTest.java | 21 +--
phoenix-hbase-compat-1.3.0/pom.xml | 95 -----------
.../hbase/regionserver/CompatStoreFileScanner.java | 33 ----
.../phoenix/compat/hbase/CompatDelegateHTable.java | 28 ----
...CompatDelegateRegionCoprocessorEnvironment.java | 27 ----
.../compat/hbase/CompatDelegateRegionObserver.java | 29 ----
.../hbase/CompatDelegatingHBaseRpcController.java | 57 -------
.../compat/hbase/CompatHBaseRpcController.java | 39 -----
.../compat/hbase/CompatObserverContext.java | 32 ----
...CompatPhoenixMetaDataControllerEnvironment.java | 36 -----
.../compat/hbase/CompatPhoenixRpcScheduler.java | 24 ---
.../hbase/CompatRegionCoprocessorEnvironment.java | 23 ---
.../compat/hbase/CompatRpcControllerFactory.java | 48 ------
.../compat/hbase/CompatScanningResultIterator.java | 21 ---
.../apache/phoenix/compat/hbase/CompatUtil.java | 54 -------
.../compat/hbase/HbaseCompatCapabilities.java | 28 ----
.../coprocessor/CompatIndexRegionObserver.java | 49 ------
.../CompatGlobalClientMetricsRegistry.java | 40 -----
.../hbase/regionserver/CompatStoreFileScanner.java | 33 ----
.../phoenix/compat/hbase/CompatDelegateHTable.java | 48 ------
...CompatDelegateRegionCoprocessorEnvironment.java | 32 ----
.../hbase/CompatDelegatingHBaseRpcController.java | 30 ----
.../compat/hbase/CompatHBaseRpcController.java | 23 ---
.../compat/hbase/CompatHBaseRpcControllerImpl.java | 41 -----
.../hbase/CompatRegionCoprocessorEnvironment.java | 29 ----
.../compat/hbase/CompatRpcControllerFactory.java | 48 ------
.../apache/phoenix/compat/hbase/CompatUtil.java | 12 --
.../CompatGlobalClientMetricsRegistry.java | 62 --------
.../hbase/regionserver/CompatStoreFileScanner.java | 33 ----
.../phoenix/compat/hbase/CompatDelegateHTable.java | 48 ------
...CompatDelegateRegionCoprocessorEnvironment.java | 32 ----
.../hbase/CompatDelegatingHBaseRpcController.java | 30 ----
.../compat/hbase/CompatHBaseRpcController.java | 23 ---
.../compat/hbase/CompatHBaseRpcControllerImpl.java | 41 -----
.../hbase/CompatRegionCoprocessorEnvironment.java | 29 ----
.../compat/hbase/CompatRpcControllerFactory.java | 48 ------
.../apache/phoenix/compat/hbase/CompatUtil.java | 12 --
.../CompatGlobalClientMetricsRegistry.java | 62 --------
.../monitoring/GlobalMetricRegistriesAdapter.java | 177 ---------------------
pom.xml | 39 +----
60 files changed, 163 insertions(+), 1785 deletions(-)
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 7fdc7a8..bb048eb 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -524,21 +524,6 @@
</properties>
</profile>
<profile>
- <id>phoenix-hbase-compat-1.3.0</id>
- <activation>
- <property>
- <name>hbase.profile</name>
- <value>1.3</value>
- </property>
- </activation>
- <properties>
- <hbase.profile>1.3</hbase.profile>
- <hbase.compat.version>1.3.0</hbase.compat.version>
- <hbase.version>${hbase-1.3.runtime.version}</hbase.version>
- <tephra.hbase.compat.version>1.3</tephra.hbase.compat.version>
- </properties>
- </profile>
- <profile>
<id>phoenix-hbase-compat-1.4.0</id>
<activation>
<property>
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/ClientRpcControllerFactory.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/ClientRpcControllerFactory.java
index c9f7fb9..9d926b5 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/ClientRpcControllerFactory.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/ClientRpcControllerFactory.java
@@ -22,39 +22,38 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellScannable;
import org.apache.hadoop.hbase.CellScanner;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.phoenix.compat.hbase.CompatHBaseRpcController;
-import org.apache.phoenix.compat.hbase.CompatRpcControllerFactory;
/**
* {@link RpcControllerFactory} that sets the priority of metadata rpc calls to be processed
* in its own queue.
*/
-public class ClientRpcControllerFactory extends CompatRpcControllerFactory {
+public class ClientRpcControllerFactory extends RpcControllerFactory {
public ClientRpcControllerFactory(Configuration conf) {
super(conf);
}
@Override
- public CompatHBaseRpcController newController() {
- CompatHBaseRpcController delegate = super.newController();
+ public HBaseRpcController newController() {
+ HBaseRpcController delegate = super.newController();
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(CellScanner cellScanner) {
- CompatHBaseRpcController delegate = super.newController(cellScanner);
+ public HBaseRpcController newController(CellScanner cellScanner) {
+ HBaseRpcController delegate = super.newController(cellScanner);
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(List<CellScannable> cellIterables) {
- CompatHBaseRpcController delegate = super.newController(cellIterables);
+ public HBaseRpcController newController(List<CellScannable> cellIterables) {
+ HBaseRpcController delegate = super.newController(cellIterables);
return getController(delegate);
}
- private CompatHBaseRpcController getController(CompatHBaseRpcController delegate) {
+ private HBaseRpcController getController(HBaseRpcController delegate) {
return new MetadataRpcController(delegate, conf);
}
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/IndexRpcController.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/IndexRpcController.java
index e5aa82d..b8976ce 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/IndexRpcController.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/IndexRpcController.java
@@ -19,9 +19,9 @@ package org.apache.hadoop.hbase.ipc.controller;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.ipc.DelegatingHBaseRpcController;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory;
-import org.apache.phoenix.compat.hbase.CompatDelegatingHBaseRpcController;
-import org.apache.phoenix.compat.hbase.CompatHBaseRpcController;
import org.apache.phoenix.query.QueryServices;
import org.apache.phoenix.query.QueryServicesOptions;
@@ -31,12 +31,12 @@ import com.google.protobuf.RpcController;
* {@link RpcController} that sets the appropriate priority of RPC calls destined for Phoenix index
* tables.
*/
-class IndexRpcController extends CompatDelegatingHBaseRpcController {
+class IndexRpcController extends DelegatingHBaseRpcController {
private final int priority;
private final String tracingTableName;
- public IndexRpcController(CompatHBaseRpcController delegate, Configuration conf) {
+ public IndexRpcController(HBaseRpcController delegate, Configuration conf) {
super(delegate);
this.priority = PhoenixRpcSchedulerFactory.getIndexPriority(conf);
this.tracingTableName = conf.get(QueryServices.TRACING_STATS_TABLE_NAME_ATTRIB,
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerIndexRpcControllerFactory.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerIndexRpcControllerFactory.java
index eb4f382..b3d5c18 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerIndexRpcControllerFactory.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerIndexRpcControllerFactory.java
@@ -23,9 +23,8 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellScannable;
import org.apache.hadoop.hbase.CellScanner;
import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.phoenix.compat.hbase.CompatHBaseRpcController;
-import org.apache.phoenix.compat.hbase.CompatRpcControllerFactory;
/**
@@ -34,33 +33,33 @@ import org.apache.phoenix.compat.hbase.CompatRpcControllerFactory;
* This controller factory shouldn't be globally configured anywhere and is meant to be used
* only internally by Phoenix indexing code.
*/
-public class InterRegionServerIndexRpcControllerFactory extends CompatRpcControllerFactory {
+public class InterRegionServerIndexRpcControllerFactory extends RpcControllerFactory {
public InterRegionServerIndexRpcControllerFactory(Configuration conf) {
super(conf);
}
@Override
- public CompatHBaseRpcController newController() {
- CompatHBaseRpcController delegate = super.newController();
+ public HBaseRpcController newController() {
+ HBaseRpcController delegate = super.newController();
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(CellScanner cellScanner) {
- CompatHBaseRpcController delegate = super.newController(cellScanner);
+ public HBaseRpcController newController(CellScanner cellScanner) {
+ HBaseRpcController delegate = super.newController(cellScanner);
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(List<CellScannable> cellIterables) {
- CompatHBaseRpcController delegate = super.newController(cellIterables);
+ public HBaseRpcController newController(List<CellScannable> cellIterables) {
+ HBaseRpcController delegate = super.newController(cellIterables);
return getController(delegate);
}
- private CompatHBaseRpcController getController(CompatHBaseRpcController delegate) {
+ private HBaseRpcController getController(HBaseRpcController delegate) {
// construct a chain of controllers: metadata, index and standard controller
- CompatHBaseRpcController indexRpcController = new IndexRpcController(delegate, conf);
+ HBaseRpcController indexRpcController = new IndexRpcController(delegate, conf);
return new MetadataRpcController(indexRpcController, conf);
}
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerMetadataRpcControllerFactory.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerMetadataRpcControllerFactory.java
index ae2171e..46588c2 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerMetadataRpcControllerFactory.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/InterRegionServerMetadataRpcControllerFactory.java
@@ -23,39 +23,38 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellScannable;
import org.apache.hadoop.hbase.CellScanner;
import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.phoenix.compat.hbase.CompatHBaseRpcController;
-import org.apache.phoenix.compat.hbase.CompatRpcControllerFactory;
/**
* {@link RpcControllerFactory} that should only be used when creating HTable for
* making remote RPCs to the region servers hosting Phoenix SYSTEM tables.
*/
-public class InterRegionServerMetadataRpcControllerFactory extends CompatRpcControllerFactory {
+public class InterRegionServerMetadataRpcControllerFactory extends RpcControllerFactory {
public InterRegionServerMetadataRpcControllerFactory(Configuration conf) {
super(conf);
}
@Override
- public CompatHBaseRpcController newController() {
- CompatHBaseRpcController delegate = super.newController();
+ public HBaseRpcController newController() {
+ HBaseRpcController delegate = super.newController();
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(CellScanner cellScanner) {
- CompatHBaseRpcController delegate = super.newController(cellScanner);
+ public HBaseRpcController newController(CellScanner cellScanner) {
+ HBaseRpcController delegate = super.newController(cellScanner);
return getController(delegate);
}
@Override
- public CompatHBaseRpcController newController(List<CellScannable> cellIterables) {
- CompatHBaseRpcController delegate = super.newController(cellIterables);
+ public HBaseRpcController newController(List<CellScannable> cellIterables) {
+ HBaseRpcController delegate = super.newController(cellIterables);
return getController(delegate);
}
- private CompatHBaseRpcController getController(CompatHBaseRpcController delegate) {
+ private HBaseRpcController getController(HBaseRpcController delegate) {
return new MetadataRpcController(delegate, conf);
}
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/MetadataRpcController.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/MetadataRpcController.java
index e489ee1..cbeabaa 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/MetadataRpcController.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/controller/MetadataRpcController.java
@@ -21,9 +21,9 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.ipc.DelegatingHBaseRpcController;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory;
-import org.apache.phoenix.compat.hbase.CompatDelegatingHBaseRpcController;
-import org.apache.phoenix.compat.hbase.CompatHBaseRpcController;
import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
import org.apache.phoenix.util.SchemaUtil;
@@ -34,7 +34,7 @@ import com.google.protobuf.RpcController;
* {@link RpcController} that sets the appropriate priority of RPC calls destined for Phoenix SYSTEM
* tables
*/
-class MetadataRpcController extends CompatDelegatingHBaseRpcController {
+class MetadataRpcController extends DelegatingHBaseRpcController {
private int priority;
// list of system tables
@@ -53,7 +53,7 @@ class MetadataRpcController extends CompatDelegatingHBaseRpcController {
.getNameAsString())
.build();
- public MetadataRpcController(CompatHBaseRpcController delegate,
+ public MetadataRpcController(HBaseRpcController delegate,
Configuration conf) {
super(delegate);
this.priority = PhoenixRpcSchedulerFactory.getMetadataPriority(conf);
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
index 4bb5f72..417aef4 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
@@ -131,23 +131,11 @@ public class IndexHalfStoreFileReader extends StoreFile.Reader {
return top;
}
- // These implement the 1.3, and 1.4+ versions of the getStoreFileScanner() interface
- // The @Override is missing, since we do not know which version will be active at compile time
-
- //The 1.4+ version
- public StoreFileScanner getStoreFileScanner(boolean cacheBlocks, boolean pread,
- boolean isCompaction, long readPt,
- long scannerOrder, boolean canOptimizeForNonNullColumn) {
- return new LocalIndexStoreFileScanner(this, getScanner(cacheBlocks, pread, isCompaction),
- true, getHFileReader().hasMVCCInfo(), readPt,
- scannerOrder, canOptimizeForNonNullColumn);
- }
-
- //The 1.3 version
- public StoreFileScanner getStoreFileScanner(boolean cacheBlocks, boolean pread,
- boolean isCompaction, long readPt) {
- return new LocalIndexStoreFileScanner(this, getScanner(cacheBlocks, pread, isCompaction),
- true, getHFileReader().hasMVCCInfo(), readPt, 0, false);
+ @Override
+ public StoreFileScanner getStoreFileScanner(boolean cacheBlocks, boolean pread, boolean isCompaction, long readPt,
+ long scannerOrder, boolean canOptimizeForNonNullColumn) {
+ return new LocalIndexStoreFileScanner(this, getScanner(cacheBlocks, pread, isCompaction), true,
+ getHFileReader().hasMVCCInfo(), readPt, scannerOrder, canOptimizeForNonNullColumn);
}
@Override
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
index faacc3a..8310a0f 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
@@ -21,6 +21,8 @@ import java.io.IOException;
import java.util.Map.Entry;
import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValue.Type;
import org.apache.hadoop.hbase.KeyValueUtil;
@@ -32,7 +34,7 @@ import org.apache.phoenix.index.IndexMaintainer;
import static org.apache.hadoop.hbase.KeyValue.ROW_LENGTH_SIZE;
-public class LocalIndexStoreFileScanner extends CompatStoreFileScanner {
+public class LocalIndexStoreFileScanner extends StoreFileScanner{
private IndexHalfStoreFileReader reader;
private boolean changeBottomKeys;
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionCoprocessorEnvironment.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionCoprocessorEnvironment.java
index 94484ad..71ed20e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionCoprocessorEnvironment.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionCoprocessorEnvironment.java
@@ -27,9 +27,9 @@ import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
+import org.apache.hadoop.hbase.metrics.MetricRegistry;
import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.regionserver.RegionServerServices;
-import org.apache.phoenix.compat.hbase.CompatDelegateRegionCoprocessorEnvironment;
import org.apache.phoenix.hbase.index.table.HTableFactory;
import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
import org.apache.phoenix.util.ServerUtil;
@@ -40,9 +40,10 @@ import org.apache.phoenix.util.ServerUtil.ConnectionType;
* clone the configuration provided by the HBase coprocessor environment before modifying it. So
* this class comes in handy where we have to return our custom config.
*/
-public class DelegateRegionCoprocessorEnvironment extends CompatDelegateRegionCoprocessorEnvironment {
+public class DelegateRegionCoprocessorEnvironment implements RegionCoprocessorEnvironment {
private final Configuration config;
+ private RegionCoprocessorEnvironment delegate;
private HTableFactory tableFactory;
public DelegateRegionCoprocessorEnvironment(RegionCoprocessorEnvironment delegate, ConnectionType connectionType) {
@@ -117,4 +118,8 @@ public class DelegateRegionCoprocessorEnvironment extends CompatDelegateRegionCo
return delegate.getSharedData();
}
+ @Override
+ public MetricRegistry getMetricRegistryForRegionServer() {
+ return delegate.getMetricRegistryForRegionServer();
+ }
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PagedRegionScanner.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PagedRegionScanner.java
index 471839b..2b8b6b6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PagedRegionScanner.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PagedRegionScanner.java
@@ -26,7 +26,6 @@ import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.regionserver.RegionScanner;
import org.apache.phoenix.filter.PagedFilter;
-import static org.apache.phoenix.compat.hbase.CompatUtil.setStartRow;
import static org.apache.phoenix.util.ScanUtil.getDummyResult;
import static org.apache.phoenix.util.ScanUtil.getPhoenixPagedFilter;
@@ -66,7 +65,7 @@ public class PagedRegionScanner extends BaseRegionScanner {
// Close the current region scanner, start a new one and return a dummy result
delegate.close();
byte[] rowKey = pageFilter.getRowKeyAtStop();
- setStartRow(scan, rowKey, true);
+ scan.withStartRow(rowKey, true);
delegate = region.getScanner(scan);
if (results.isEmpty()) {
getDummyResult(rowKey, results);
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/DelegateHTable.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/DelegateHTable.java
index 82e0884..8ca8a91 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/DelegateHTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/DelegateHTable.java
@@ -40,17 +40,17 @@ import org.apache.hadoop.hbase.client.coprocessor.Batch.Call;
import org.apache.hadoop.hbase.client.coprocessor.Batch.Callback;
import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel;
-import org.apache.phoenix.compat.hbase.CompatDelegateHTable;
import com.google.protobuf.Descriptors.MethodDescriptor;
import com.google.protobuf.Message;
import com.google.protobuf.Service;
import com.google.protobuf.ServiceException;
-public class DelegateHTable extends CompatDelegateHTable implements Table {
+public class DelegateHTable implements Table {
+ protected final Table delegate;
public DelegateHTable(Table delegate) {
- super(delegate);
+ this.delegate = delegate;
}
@Override
@@ -268,4 +268,24 @@ public class DelegateHTable extends CompatDelegateHTable implements Table {
return delegate.checkAndDelete(row, family, qualifier, compareOp, value, delete);
}
+ @Override
+ public int getReadRpcTimeout() {
+ return delegate.getReadRpcTimeout();
+ }
+
+ @Override
+ public void setReadRpcTimeout(int readRpcTimeout) {
+ delegate.setReadRpcTimeout(readRpcTimeout);
+ }
+
+ @Override
+ public int getWriteRpcTimeout() {
+ return delegate.getWriteRpcTimeout();
+ }
+
+ @Override
+ public void setWriteRpcTimeout(int writeRpcTimeout) {
+ delegate.setWriteRpcTimeout(writeRpcTimeout);
+ }
+
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java b/phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java
index 374c292..1d2ced6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java
@@ -17,12 +17,6 @@
*/
package org.apache.phoenix.index;
-import static org.apache.phoenix.compat.hbase.CompatUtil.setSingleRow;
-import static org.apache.phoenix.compat.hbase.CompatUtil.setStartRow;
-import static org.apache.phoenix.coprocessor.BaseScannerRegionObserver.CHECK_VERIFY_COLUMN;
-import static org.apache.phoenix.coprocessor.BaseScannerRegionObserver.EMPTY_COLUMN_FAMILY_NAME;
-import static org.apache.phoenix.coprocessor.BaseScannerRegionObserver.EMPTY_COLUMN_QUALIFIER_NAME;
-import static org.apache.phoenix.coprocessor.BaseScannerRegionObserver.PHYSICAL_DATA_TABLE_NAME;
import static org.apache.phoenix.hbase.index.IndexRegionObserver.VERIFIED_BYTES;
import static org.apache.phoenix.index.IndexMaintainer.getIndexMaintainer;
import static org.apache.phoenix.schema.types.PDataType.TRUE_BYTES;
@@ -362,7 +356,8 @@ public class GlobalIndexChecker extends BaseScannerRegionObserver {
// Rebuild the index row from the corresponding the row in the the data table
// Get the data row key from the index row key
byte[] dataRowKey = indexMaintainer.buildDataRowKey(new ImmutableBytesWritable(indexRowKey), viewConstants);
- setSingleRow(buildIndexScan, dataRowKey);
+ buildIndexScan.withStartRow(dataRowKey, true);
+ buildIndexScan.withStopRow(dataRowKey, true);
buildIndexScan.setTimeRange(0, maxTimestamp);
// Pass the index row key to the partial index builder which will rebuild the index row and check if the
// row key of this rebuilt index row matches with the passed index row key
@@ -386,7 +381,7 @@ public class GlobalIndexChecker extends BaseScannerRegionObserver {
row.clear();
if (restartScanDueToPageFilterRemoval) {
scanner.close();
- setStartRow(indexScan, indexRowKey, false);
+ scan.withStartRow(indexRowKey, false);
scanner = ((BaseRegionScanner)delegate).getNewRegionScanner(indexScan);
hasMore = true;
// Set restartScanDueToPageFilterRemoval to false as we do not restart the scan unnecessarily next time
@@ -404,7 +399,7 @@ public class GlobalIndexChecker extends BaseScannerRegionObserver {
// Delete the unverified row from index if it is old enough
deleteRowIfAgedEnough(indexRowKey, ts, false);
// Open a new scanner starting from the row after the current row
- setStartRow(indexScan, indexRowKey, false);
+ indexScan.withStartRow(indexRowKey, false);
scanner = ((BaseRegionScanner)delegate).getNewRegionScanner(indexScan);
hasMore = true;
// Skip this unverified row (i.e., do not return it to the client). Just retuning empty row is
@@ -414,7 +409,7 @@ public class GlobalIndexChecker extends BaseScannerRegionObserver {
}
// code == RebuildReturnCode.INDEX_ROW_EXISTS.getValue()
// Open a new scanner starting from the current row
- setStartRow(indexScan, indexRowKey, true);
+ indexScan.withStartRow(indexRowKey, true);
scanner = ((BaseRegionScanner)delegate).getNewRegionScanner(indexScan);
hasMore = scanner.next(row);
if (row.isEmpty()) {
@@ -457,7 +452,8 @@ public class GlobalIndexChecker extends BaseScannerRegionObserver {
// Now we will do a single row scan to retrieve the verified index row built from the data table row.
// Note we cannot read all versions in one scan as the max number of row versions for an index table
// can be 1. In that case, we will get only one (i.e., the most recent) version instead of all versions
- setSingleRow(singleRowIndexScan, indexRowKey);
+ singleRowIndexScan.withStartRow(indexRowKey, true);
+ singleRowIndexScan.withStopRow(indexRowKey, true);
singleRowIndexScan.setTimeRange(minTimestamp, ts);
RegionScanner singleRowScanner = ((BaseRegionScanner)delegate).getNewRegionScanner(singleRowIndexScan);
row.clear();
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ScanningResultIterator.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ScanningResultIterator.java
index 4db8cfe..8b30882 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ScanningResultIterator.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ScanningResultIterator.java
@@ -62,14 +62,12 @@ import org.apache.phoenix.util.ServerUtil;
public class ScanningResultIterator implements ResultIterator {
private final ResultScanner scanner;
- private final Scan scan;
private final ScanMetricsHolder scanMetricsHolder;
boolean scanMetricsUpdated;
boolean scanMetricsEnabled;
public ScanningResultIterator(ResultScanner scanner, Scan scan, ScanMetricsHolder scanMetricsHolder) {
this.scanner = scanner;
- this.scan = scan;
this.scanMetricsHolder = scanMetricsHolder;
scanMetricsUpdated = false;
scanMetricsEnabled = scan.isScanMetricsEnabled();
@@ -97,9 +95,7 @@ public class ScanningResultIterator implements ResultIterator {
private void updateMetrics() {
if (scanMetricsEnabled && !scanMetricsUpdated) {
- ScanMetrics scanMetrics = scan.getScanMetrics();
- if (scanMetrics == null)
- return; // See PHOENIX-5345
+ ScanMetrics scanMetrics = scanner.getScanMetrics();
Map<String, Long> scanMetricsMap = scanMetrics.getMetricsMap();
scanMetricsHolder.setScanMetricMap(scanMetricsMap);
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
index 6b0dee7..450d9d3 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
@@ -34,11 +34,11 @@ import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
+import org.apache.hadoop.hbase.metrics.MetricRegistry;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.regionserver.RegionScanner;
import org.apache.hadoop.hbase.regionserver.RegionServerServices;
-import org.apache.phoenix.compat.hbase.CompatRegionCoprocessorEnvironment;
import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
import org.apache.phoenix.jdbc.PhoenixConnection;
import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
@@ -148,7 +148,7 @@ public class SnapshotScanner extends AbstractClientScanner {
}
private RegionCoprocessorEnvironment getSnapshotContextEnvironment(final Configuration conf) {
- return new CompatRegionCoprocessorEnvironment() {
+ return new RegionCoprocessorEnvironment() {
@Override
public Region getRegion() {
return region;
@@ -215,6 +215,10 @@ public class SnapshotScanner extends AbstractClientScanner {
throw new UnsupportedOperationException();
}
+ @Override
+ public MetricRegistry getMetricRegistryForRegionServer() {
+ throw new UnsupportedOperationException();
+ }
};
}
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java
index 8c192d8..782629b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java
@@ -61,6 +61,10 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.apache.hadoop.hbase.metrics.Gauge;
+import org.apache.hadoop.hbase.metrics.MetricRegistries;
+import org.apache.hadoop.hbase.metrics.MetricRegistry;
+import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
import org.apache.phoenix.query.QueryServicesOptions;
import com.google.common.annotations.VisibleForTesting;
@@ -121,7 +125,12 @@ public enum GlobalClientMetrics {
static {
initPhoenixGlobalClientMetrics();
- GlobalClientMetricsRegistry.register();
+ if (isGlobalMetricsEnabled) {
+ MetricRegistry metricRegistry = createMetricRegistry();
+ registerPhoenixMetricsToRegistry(metricRegistry);
+ GlobalMetricRegistriesAdapter.getInstance().registerMetricRegistry(metricRegistry,
+ QueryServicesOptions.withDefaults().getClientMetricTag());
+ }
}
private static void initPhoenixGlobalClientMetrics() {
@@ -131,14 +140,47 @@ public enum GlobalClientMetrics {
}
}
+ private static void registerPhoenixMetricsToRegistry(MetricRegistry metricRegistry) {
+ for (GlobalClientMetrics globalMetric : GlobalClientMetrics.values()) {
+ metricRegistry.register(globalMetric.metricType.columnName(),
+ new PhoenixGlobalMetricGauge(globalMetric.metric));
+ }
+ }
+
+ private static MetricRegistry createMetricRegistry() {
+ LOGGER.info("Creating Metric Registry for Phoenix Global Metrics");
+ MetricRegistryInfo registryInfo = new MetricRegistryInfo("PHOENIX", "Phoenix Client Metrics",
+ "phoenix", "Phoenix,sub=CLIENT", true);
+ return MetricRegistries.global().create(registryInfo);
+ }
+
+ /**
+ * Class to convert Phoenix Metric objects into HBase Metric objects (Gauge)
+ */
+ private static class PhoenixGlobalMetricGauge implements Gauge<Long> {
+
+ private final GlobalMetric metric;
+
+ public PhoenixGlobalMetricGauge(GlobalMetric metric) {
+ this.metric = metric;
+ }
+
+ @Override
+ public Long getValue() {
+ return metric.getValue();
+ }
+ }
+
public void update(long value) {
metric.change(value);
}
+ @VisibleForTesting
public GlobalMetric getMetric() {
return metric;
}
+ @VisibleForTesting
public MetricType getMetricType() {
return metricType;
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetricsRegistry.java b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetricsRegistry.java
deleted file mode 100644
index 60220f8..0000000
--- a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetricsRegistry.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.monitoring;
-
-import org.apache.phoenix.query.QueryServicesOptions;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class GlobalClientMetricsRegistry extends CompatGlobalClientMetricsRegistry {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(GlobalClientMetrics.class);
-
- public static void register() {
- if (GlobalClientMetrics.isMetricsEnabled()) {
- createRegistry();
- registerPhoenixMetricsToRegistry();
- registerMetricsAdapter(QueryServicesOptions.withDefaults().getClientMetricTag());
- }
- }
-
- private static void registerPhoenixMetricsToRegistry() {
- for (final GlobalClientMetrics globalMetric : GlobalClientMetrics.values()) {
- final GlobalMetric innerMetric = globalMetric.getMetric();
- registerMetricToRegistry(globalMetric.getMetricType().columnName(),
- new ValueProvider() {
- @Override
- public Long getValue() {
- return innerMetric.getValue();
- }
- });
- }
- }
-
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
similarity index 92%
rename from phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
rename to phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
index 66556f6..5242617 100644
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
@@ -37,12 +37,13 @@ import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.metrics2.lib.Interns;
import org.apache.hadoop.metrics2.lib.MutableHistogram;
import org.apache.hadoop.metrics2.source.JvmMetrics;
+import org.apache.phoenix.query.QueryServicesOptions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Contents mostly copied from GlobalMetricRegistriesAdapter class from hbase-hadoop2-compat The
- * adapter attaches HBase's MetricRegistry to Hadoop's DefaultMetricsSystem
+ * Contents mostly copied from GlobalMetricRegistriesAdapter class from hbase-hadoop2-compat
+ * The adapter attaches HBase's MetricRegistry to Hadoop's DefaultMetricsSystem
* Note: This DOES NOT handle dynamic attach/detach of registries
*/
public class GlobalMetricRegistriesAdapter {
@@ -66,7 +67,7 @@ public class GlobalMetricRegistriesAdapter {
return;
}
- HBaseMetrics2HadoopMetricsAdapter adapter =
+ HBaseMetrics2HadoopMetricsAdapter adapter =
new HBaseMetrics2HadoopMetricsAdapter(registry, metricTag);
adapter.registerToDefaultMetricsSystem();
}
@@ -87,17 +88,16 @@ public class GlobalMetricRegistriesAdapter {
private void registerToDefaultMetricsSystem() {
MetricRegistryInfo info = registry.getMetricRegistryInfo();
- LOGGER.info("Registering " + info.getMetricsJmxContext() + " "
- + info.getMetricsDescription() + " into DefaultMetricsSystem");
+ LOGGER.info("Registering " + info.getMetricsJmxContext() +
+ " " + info.getMetricsDescription() + " into DefaultMetricsSystem");
DefaultMetricsSystem.instance().register(info.getMetricsJmxContext(),
- info.getMetricsDescription(), this);
+ info.getMetricsDescription(), this);
}
private void snapshotAllMetrics(MetricRegistry metricRegistry, MetricsCollector collector) {
MetricRegistryInfo hbaseMetricRegistryInfo = metricRegistry.getMetricRegistryInfo();
- MetricsInfo hadoopMetricsInfo =
- Interns.info(hbaseMetricRegistryInfo.getMetricsName(),
- hbaseMetricRegistryInfo.getMetricsDescription());
+ MetricsInfo hadoopMetricsInfo = Interns.info(hbaseMetricRegistryInfo.getMetricsName(),
+ hbaseMetricRegistryInfo.getMetricsDescription());
MetricsRecordBuilder builder = collector.addRecord(hadoopMetricsInfo);
builder.setContext(hbaseMetricRegistryInfo.getMetricsContext());
builder.tag(hadoopMetricsInfo, metricTag);
@@ -109,7 +109,7 @@ public class GlobalMetricRegistriesAdapter {
Map<String, Metric> metrics = metricRegistry.getMetrics();
Iterator iterator = metrics.entrySet().iterator();
- while (iterator.hasNext()) {
+ while(iterator.hasNext()) {
Entry<String, Metric> e = (Entry) iterator.next();
String name = StringUtils.capitalize(e.getKey());
Metric metric = e.getValue();
@@ -133,7 +133,7 @@ public class GlobalMetricRegistriesAdapter {
MetricsInfo info = Interns.info(name, "");
Object o = gauge.getValue();
if (o instanceof Integer) {
- builder.addGauge(info, (Integer) o);
+ builder.addGauge(info, (Integer)o);
} else if (o instanceof Long) {
builder.addGauge(info, (Long) o);
} else if (o instanceof Float) {
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/UpdateStatisticsTool.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/UpdateStatisticsTool.java
index 4256d44..c72d654 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/UpdateStatisticsTool.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/stats/UpdateStatisticsTool.java
@@ -30,6 +30,8 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil;
+import org.apache.hadoop.hbase.metrics.Gauge;
+import org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.JobPriority;
@@ -39,7 +41,6 @@ import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.htrace.SpanReceiver;
-import org.apache.phoenix.compat.hbase.CompatUtil;
import org.apache.phoenix.jdbc.PhoenixConnection;
import org.apache.phoenix.mapreduce.util.ConnectionUtil;
import org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil;
@@ -214,13 +215,10 @@ public class UpdateStatisticsTool extends Configured implements Tool {
job.setPriority(this.jobPriority);
TableMapReduceUtil.addDependencyJars(job);
- TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
- PhoenixConnection.class, Chronology.class, CharStream.class,
- TransactionSystemClient.class, TransactionNotInProgressException.class, ZKClient.class,
- DiscoveryServiceClient.class, ZKDiscoveryService.class, Cancellable.class,
- TTransportException.class, SpanReceiver.class, TransactionProcessor.class);
- TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(),
- CompatUtil.getMrMetricsClasses());
+ TableMapReduceUtil.addDependencyJarsForClasses(job.getConfiguration(), PhoenixConnection.class, Chronology.class,
+ CharStream.class, TransactionSystemClient.class, TransactionNotInProgressException.class,
+ ZKClient.class, DiscoveryServiceClient.class, ZKDiscoveryService.class,
+ Cancellable.class, TTransportException.class, SpanReceiver.class, TransactionProcessor.class, Gauge.class, MetricRegistriesImpl.class);
LOGGER.info("UpdateStatisticsTool running for: " + tableName
+ " on snapshot: " + snapshotName + " with restore dir: " + restoreDir);
}
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
index 3c77201..73c3b6d 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
@@ -322,22 +322,22 @@ public class OmidTransactionTable implements Table {
throw new UnsupportedOperationException();
}
- //No @Override for compatibility reasons
+ @Override
public int getWriteRpcTimeout() {
throw new UnsupportedOperationException();
}
- //No @Override for compatibility reasons
+ @Override
public void setWriteRpcTimeout(int writeRpcTimeout) {
throw new UnsupportedOperationException();
}
- //No @Override for compatibility reasons
+ @Override
public int getReadRpcTimeout() {
throw new UnsupportedOperationException();
}
- //No @Override for compatibility reasons
+ @Override
public void setReadRpcTimeout(int readRpcTimeout) {
throw new UnsupportedOperationException();
}
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/coprocessor/TaskMetaDataEndpointTest.java b/phoenix-core/src/test/java/org/apache/phoenix/coprocessor/TaskMetaDataEndpointTest.java
index fb2e9e9..3a90e35 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/coprocessor/TaskMetaDataEndpointTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/coprocessor/TaskMetaDataEndpointTest.java
@@ -28,11 +28,11 @@ import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
+import org.apache.hadoop.hbase.metrics.MetricRegistry;
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.regionserver.RegionServerServices;
import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.compat.hbase.CompatRegionCoprocessorEnvironment;
import org.apache.phoenix.coprocessor.generated.MetaDataProtos;
import org.apache.phoenix.coprocessor.generated.TaskMetaDataProtos;
import org.apache.phoenix.protobuf.ProtobufUtil;
@@ -71,7 +71,7 @@ public class TaskMetaDataEndpointTest {
MockitoAnnotations.initMocks(this);
configuration = new Configuration();
RegionCoprocessorEnvironment environment =
- new CompatRegionCoprocessorEnvironment() {
+ new RegionCoprocessorEnvironment() {
@Override
public int getVersion() {
@@ -139,6 +139,11 @@ public class TaskMetaDataEndpointTest {
public ConcurrentMap<String, Object> getSharedData() {
return null;
}
+
+ @Override
+ public MetricRegistry getMetricRegistryForRegionServer() {
+ return null;
+ }
};
taskMetaDataEndpoint = new TaskMetaDataEndpoint();
taskMetaDataEndpoint.start(environment);
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 5d2204d..dea0599 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -1976,18 +1976,6 @@ public abstract class BaseTest {
splitTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME, splitPoints);
}
- // We don't need need this for 1.4+, but this works with 1.3, 1.4, and 1.5
- private static int getRegionServerIndex(MiniHBaseCluster cluster, ServerName serverName) {
- // we have a small number of region servers, this should be fine for now.
- List<RegionServerThread> servers = cluster.getRegionServerThreads();
- for (int i = 0; i < servers.size(); i++) {
- if (servers.get(i).getRegionServer().getServerName().equals(serverName)) {
- return i;
- }
- }
- return -1;
- }
-
/**
* Ensures each region of SYSTEM.CATALOG is on a different region server
*/
@@ -1998,13 +1986,8 @@ public abstract class BaseTest {
HMaster master = cluster.getMaster();
AssignmentManager am = master.getAssignmentManager();
- // The 1.4+ MiniCluster way
- // HRegionServer dstServer = util.getHBaseCluster().getRegionServer(dstServerName);
- // HRegionServer srcServer = util.getHBaseCluster().getRegionServer(srcServerName);
- HRegionServer dstServer =
- cluster.getRegionServer(getRegionServerIndex(cluster, dstServerName));
- HRegionServer srcServer =
- cluster.getRegionServer(getRegionServerIndex(cluster, srcServerName));
+ HRegionServer dstServer = util.getHBaseCluster().getRegionServer(dstServerName);
+ HRegionServer srcServer = util.getHBaseCluster().getRegionServer(srcServerName);
byte[] encodedRegionNameInBytes = regionInfo.getEncodedNameAsBytes();
admin.move(encodedRegionNameInBytes, Bytes.toBytes(dstServer.getServerName().getServerName()));
while (dstServer.getOnlineRegion(regionInfo.getRegionName()) == null
diff --git a/phoenix-hbase-compat-1.3.0/pom.xml b/phoenix-hbase-compat-1.3.0/pom.xml
deleted file mode 100644
index b3abf1b..0000000
--- a/phoenix-hbase-compat-1.3.0/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>phoenix</artifactId>
- <groupId>org.apache.phoenix</groupId>
- <version>4.17.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>phoenix-hbase-compat-1.3.0</artifactId>
- <name>Phoenix Hbase 1.3.0 compatibility</name>
- <description>Compatibility module for HBase 1.3.0+</description>
-
- <properties>
- <hbase13.version>1.3.0</hbase13.version>
- </properties>
-
- <dependencies>
- <!-- Override the parent dependencyManagement for every HBase artifact -->
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-server</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-common</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-annotations</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-common</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-protocol</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-client</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-procedure</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-hadoop-compat</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-hadoop2-compat</artifactId>
- <version>${hbase13.version}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
deleted file mode 100644
index e28d948..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.regionserver;
-
-import org.apache.hadoop.hbase.io.hfile.HFileScanner;
-import org.apache.hadoop.hbase.regionserver.StoreFile.Reader;
-import org.apache.hadoop.hbase.regionserver.StoreFileScanner;
-
-// This has to be in org.apache.hadoop.hbase.regionserver due to the default
-// visibility of some methods
-public abstract class CompatStoreFileScanner extends StoreFileScanner {
-
- public CompatStoreFileScanner(Reader reader, HFileScanner hfs, boolean useMVCC, boolean hasMVCC,
- long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) {
- super(reader, hfs, useMVCC, hasMVCC, readPt);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
deleted file mode 100644
index 1a1921b..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.client.Table;
-
-public abstract class CompatDelegateHTable implements Table {
- protected final Table delegate;
-
- public CompatDelegateHTable(Table delegate) {
- this.delegate = delegate;
- }
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
deleted file mode 100644
index cfa5bd1..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-
-public abstract class CompatDelegateRegionCoprocessorEnvironment
- implements RegionCoprocessorEnvironment {
-
- protected RegionCoprocessorEnvironment delegate;
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionObserver.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionObserver.java
deleted file mode 100644
index 36db2ce..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionObserver.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionObserver;
-
-public abstract class CompatDelegateRegionObserver implements RegionObserver {
-
- protected final RegionObserver delegate;
-
- public CompatDelegateRegionObserver(RegionObserver delegate) {
- this.delegate = delegate;
- }
-}
\ No newline at end of file
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
deleted file mode 100644
index 9c00a33..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
-
-// We need to copy the HBase implementation, because we need to have CompatHBaseRpcController
-// as ancestor, so we cannot simply subclass the HBase Delegating* class
-public abstract class CompatDelegatingHBaseRpcController extends CompatHBaseRpcController {
- private PayloadCarryingRpcController delegate;
-
- public CompatDelegatingHBaseRpcController(CompatHBaseRpcController delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public CellScanner cellScanner() {
- return delegate.cellScanner();
- }
-
- @Override
- public void setCellScanner(final CellScanner cellScanner) {
- delegate.setCellScanner(cellScanner);
- }
-
- @Override
- public void setPriority(int priority) {
- delegate.setPriority(priority);
- }
-
- @Override
- public void setPriority(final TableName tn) {
- delegate.setPriority(tn);
- }
-
- @Override
- public int getPriority() {
- return delegate.getPriority();
- }
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
deleted file mode 100644
index c8bfbe5..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
-
-public class CompatHBaseRpcController extends PayloadCarryingRpcController {
-
- public CompatHBaseRpcController() {
- this((CellScanner) null);
- }
-
- public CompatHBaseRpcController(final CellScanner cellScanner) {
- super(cellScanner);
- }
-
- public CompatHBaseRpcController(final List<CellScannable> cellIterables) {
- super(cellIterables);
- }
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatObserverContext.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatObserverContext.java
deleted file mode 100644
index 2dfb6b7..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatObserverContext.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.coprocessor.ObserverContext;
-import org.apache.hadoop.hbase.security.User;
-
-public class CompatObserverContext<E extends CoprocessorEnvironment> extends ObserverContext {
-
- public CompatObserverContext(User caller) {
- // We are silently dropping the argument, instead of not pre-computing it
- // This has some performance impact, but I believe that it is negligible
- super();
- }
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixMetaDataControllerEnvironment.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixMetaDataControllerEnvironment.java
deleted file mode 100644
index a0b53fc..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixMetaDataControllerEnvironment.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.Coprocessor;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-
-public abstract class CompatPhoenixMetaDataControllerEnvironment extends CoprocessorHost.Environment
- implements RegionCoprocessorEnvironment {
-
- protected RegionCoprocessorEnvironment env;
-
- public CompatPhoenixMetaDataControllerEnvironment(RegionCoprocessorEnvironment env,
- Coprocessor instance, int priority, int sequence, Configuration conf) {
- super(instance, priority, sequence, conf);
- this.env = env;
- }
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
deleted file mode 100644
index 18fa149..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.ipc.RpcScheduler;
-
-public abstract class CompatPhoenixRpcScheduler extends RpcScheduler {
- protected RpcScheduler delegate;
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
deleted file mode 100644
index dd30029..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-
-public abstract class CompatRegionCoprocessorEnvironment implements RegionCoprocessorEnvironment {
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
deleted file mode 100644
index 7de11b4..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-
-public class CompatRpcControllerFactory extends RpcControllerFactory {
-
- public CompatRpcControllerFactory(Configuration conf) {
- super(conf);
- }
-
- @Override
- public CompatHBaseRpcController newController() {
- return new CompatHBaseRpcController();
- }
-
- @Override
- public CompatHBaseRpcController newController(final CellScanner cellScanner) {
- return new CompatHBaseRpcController(cellScanner);
- }
-
- @Override
- public CompatHBaseRpcController newController(final List<CellScannable> cellIterables) {
- return new CompatHBaseRpcController(cellIterables);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatScanningResultIterator.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatScanningResultIterator.java
deleted file mode 100644
index 6afc5f0..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatScanningResultIterator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-public abstract class CompatScanningResultIterator {
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
deleted file mode 100644
index 2880b7d..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.master.HMaster;
-
-public class CompatUtil {
-
- public static Class[] getMrMetricsClasses() {
- return new Class[] {};
- }
-
- public static Scan setStartRow(Scan scan, byte[] indexRowKey, boolean inclusive) {
- if (inclusive) {
- return scan.setStartRow(indexRowKey);
- } else {
- byte[] nextIndexRowKey = new byte[indexRowKey.length + 1];
- System.arraycopy(indexRowKey, 0, nextIndexRowKey, 0, indexRowKey.length);
- nextIndexRowKey[indexRowKey.length] = 0;
- return scan.setStartRow(nextIndexRowKey);
- }
- }
-
- public static Scan setSingleRow(Scan scan, byte[] indexRowKey) {
- return scan.setStartRow(indexRowKey).setStopRow(indexRowKey);
- }
-
- /**
- * HBase 1.5+ has storeRefCount available in RegionMetrics
- *
- * @param master Active HMaster instance
- * @return true if any region has refCount leakage
- */
- public static boolean isAnyStoreRefCountLeaked(HMaster master) {
- return false;
- }
-
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
deleted file mode 100644
index 515e7e6..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-public class HbaseCompatCapabilities {
-
- public static boolean hasNewMetrics() {
- return false;
- }
-
- //HBase 1.5+ has preWALAppend() on RegionObserver (HBASE-22623)
- public static boolean hasPreWALAppend() { return false; }
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/coprocessor/CompatIndexRegionObserver.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/coprocessor/CompatIndexRegionObserver.java
deleted file mode 100644
index 57e4685..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/compat/hbase/coprocessor/CompatIndexRegionObserver.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.phoenix.compat.hbase.coprocessor;
-
-import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
-import org.apache.hadoop.hbase.coprocessor.ObserverContext;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
-import org.apache.hadoop.hbase.wal.WALKey;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class CompatIndexRegionObserver extends BaseRegionObserver {
-
- public void preWALAppend(ObserverContext<RegionCoprocessorEnvironment> c, WALKey key,
- WALEdit edit) {
- //no-op implementation for HBase 1.3 and 1.4 that doesn't support this co-proc hook.
- }
-
- public static void appendToWALKey(WALKey key, String attrKey, byte[] attrValue) {
- //no-op for HBase 1.3 and 1.4 because we don't have WALKey.addExtendedAttribute(String,
- // byte[])
- }
-
- public static byte[] getAttributeValueFromWALKey(WALKey key, String attrKey) {
- return null;
- }
-
- public static Map<String, byte[]> getAttributeValuesFromWALKey(WALKey key) {
- return new HashMap<String, byte[]>();
- }
-}
diff --git a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java b/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
deleted file mode 100644
index 1441a95..0000000
--- a/phoenix-hbase-compat-1.3.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.monitoring;
-
-public class CompatGlobalClientMetricsRegistry {
-
- protected static void createRegistry() {
- // NOOP
- }
-
- protected static void registerMetricToRegistry(final String name,
- final ValueProvider valueProvider) {
- // NOOP
- }
-
- protected static void registerMetricsAdapter(String metricTag) {
- // NOOP
- }
-
- // Glue interface to break dependency on org.apache.hadoop.hbase.metrics.Gauge
- protected interface ValueProvider {
- public Long getValue();
- }
-
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
deleted file mode 100644
index c935cdf..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.regionserver;
-
-import org.apache.hadoop.hbase.io.hfile.HFileScanner;
-import org.apache.hadoop.hbase.regionserver.StoreFile.Reader;
-import org.apache.hadoop.hbase.regionserver.StoreFileScanner;
-
-// This has to be in org.apache.hadoop.hbase.regionserver due to the default
-// visibility of some methods
-public abstract class CompatStoreFileScanner extends StoreFileScanner {
-
- public CompatStoreFileScanner(Reader reader, HFileScanner hfs, boolean useMVCC, boolean hasMVCC,
- long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) {
- super(reader, hfs, useMVCC, hasMVCC, readPt, scannerOrder, canOptimizeForNonNullColumn);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
deleted file mode 100644
index 7baffd8..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.client.Table;
-
-public abstract class CompatDelegateHTable implements Table {
- protected final Table delegate;
-
- public CompatDelegateHTable(Table delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public int getReadRpcTimeout() {
- return delegate.getReadRpcTimeout();
- }
-
- @Override
- public void setReadRpcTimeout(int readRpcTimeout) {
- delegate.setReadRpcTimeout(readRpcTimeout);
- }
-
- @Override
- public int getWriteRpcTimeout() {
- return delegate.getWriteRpcTimeout();
- }
-
- @Override
- public void setWriteRpcTimeout(int writeRpcTimeout) {
- delegate.setWriteRpcTimeout(writeRpcTimeout);
- }
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
deleted file mode 100644
index c89601f..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-
-public abstract class CompatDelegateRegionCoprocessorEnvironment
- implements RegionCoprocessorEnvironment {
-
- protected RegionCoprocessorEnvironment delegate;
-
- @Override
- public MetricRegistry getMetricRegistryForRegionServer() {
- return delegate.getMetricRegistryForRegionServer();
- }
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
deleted file mode 100644
index c6b06f7..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.ipc.DelegatingHBaseRpcController;
-
-// We need to copy the HBase implementation, because we need to have CompatHBaseRpcController
-// as ancestor, so we cannot simply subclass the HBase Delegating* class
-public abstract class CompatDelegatingHBaseRpcController extends DelegatingHBaseRpcController
- implements CompatHBaseRpcController {
-
- public CompatDelegatingHBaseRpcController(CompatHBaseRpcController delegate) {
- super(delegate);
- }
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
deleted file mode 100644
index a4827f2..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.ipc.HBaseRpcController;
-
-public interface CompatHBaseRpcController extends HBaseRpcController {
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java
deleted file mode 100644
index 3fc88e3..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.ipc.HBaseRpcControllerImpl;
-
-public class CompatHBaseRpcControllerImpl extends HBaseRpcControllerImpl
- implements CompatHBaseRpcController {
-
- public CompatHBaseRpcControllerImpl() {
- super();
- }
-
- public CompatHBaseRpcControllerImpl(final CellScanner cellScanner) {
- super(cellScanner);
- }
-
- public CompatHBaseRpcControllerImpl(final List<CellScannable> cellIterables) {
- super(cellIterables);
- }
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
deleted file mode 100644
index 7b71ef8..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-
-public abstract class CompatRegionCoprocessorEnvironment implements RegionCoprocessorEnvironment {
-
- @Override
- public MetricRegistry getMetricRegistryForRegionServer() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
deleted file mode 100644
index 22bd0eb..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-
-public abstract class CompatRpcControllerFactory extends RpcControllerFactory {
-
- public CompatRpcControllerFactory(Configuration conf) {
- super(conf);
- }
-
- @Override
- public CompatHBaseRpcController newController() {
- return new CompatHBaseRpcControllerImpl();
- }
-
- @Override
- public CompatHBaseRpcController newController(final CellScanner cellScanner) {
- return new CompatHBaseRpcControllerImpl(cellScanner);
- }
-
- @Override
- public CompatHBaseRpcController newController(final List<CellScannable> cellIterables) {
- return new CompatHBaseRpcControllerImpl(cellIterables);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index 765ed7b..21b48ca 100644
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++ b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -23,18 +23,6 @@ import org.apache.hadoop.hbase.metrics.Gauge;
import org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl;
public abstract class CompatUtil {
- public static Class[] getMrMetricsClasses() {
- return new Class[] { Gauge.class, MetricRegistriesImpl.class };
- }
-
- public static Scan setStartRow(Scan scan, byte[] indexRowKey, boolean inclusive) {
- return scan.withStartRow(indexRowKey, inclusive);
- }
-
- public static Scan setSingleRow(Scan scan, byte[] indexRowKey) {
- return scan.withStartRow(indexRowKey, true).withStopRow(indexRowKey, true);
- }
-
/**
* HBase 1.5+ has storeRefCount available in RegionMetrics
*
diff --git a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java b/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
deleted file mode 100644
index d0eb389..0000000
--- a/phoenix-hbase-compat-1.4.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.monitoring;
-
-import org.apache.hadoop.hbase.metrics.Gauge;
-import org.apache.hadoop.hbase.metrics.MetricRegistries;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CompatGlobalClientMetricsRegistry {
-
- private static final Logger LOGGER =
- LoggerFactory.getLogger(CompatGlobalClientMetricsRegistry.class);
-
- protected static MetricRegistry metricRegistry;
-
- protected static void createRegistry() {
- LOGGER.info("Creating Metric Registry for Phoenix Global Metrics");
- MetricRegistryInfo registryInfo =
- new MetricRegistryInfo("PHOENIX", "Phoenix Client Metrics", "phoenix",
- "Phoenix,sub=CLIENT", true);
- metricRegistry = MetricRegistries.global().create(registryInfo);
- }
-
- protected static void registerMetricToRegistry(final String name,
- final ValueProvider valueProvider) {
- metricRegistry.register(name, new Gauge<Long>() {
- @Override
- public Long getValue() {
- return valueProvider.getValue();
- }
- });
- }
-
- protected static void registerMetricsAdapter(String metricTag) {
- GlobalMetricRegistriesAdapter.getInstance().registerMetricRegistry(metricRegistry,
- metricTag);
- }
-
- // Glue interface to break dependency on org.apache.hadoop.hbase.metrics.Gauge
- protected interface ValueProvider {
- public Long getValue();
- }
-
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
deleted file mode 100644
index c935cdf..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/hadoop/hbase/regionserver/CompatStoreFileScanner.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.regionserver;
-
-import org.apache.hadoop.hbase.io.hfile.HFileScanner;
-import org.apache.hadoop.hbase.regionserver.StoreFile.Reader;
-import org.apache.hadoop.hbase.regionserver.StoreFileScanner;
-
-// This has to be in org.apache.hadoop.hbase.regionserver due to the default
-// visibility of some methods
-public abstract class CompatStoreFileScanner extends StoreFileScanner {
-
- public CompatStoreFileScanner(Reader reader, HFileScanner hfs, boolean useMVCC, boolean hasMVCC,
- long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) {
- super(reader, hfs, useMVCC, hasMVCC, readPt, scannerOrder, canOptimizeForNonNullColumn);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
deleted file mode 100644
index 7baffd8..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.client.Table;
-
-public abstract class CompatDelegateHTable implements Table {
- protected final Table delegate;
-
- public CompatDelegateHTable(Table delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public int getReadRpcTimeout() {
- return delegate.getReadRpcTimeout();
- }
-
- @Override
- public void setReadRpcTimeout(int readRpcTimeout) {
- delegate.setReadRpcTimeout(readRpcTimeout);
- }
-
- @Override
- public int getWriteRpcTimeout() {
- return delegate.getWriteRpcTimeout();
- }
-
- @Override
- public void setWriteRpcTimeout(int writeRpcTimeout) {
- delegate.setWriteRpcTimeout(writeRpcTimeout);
- }
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
deleted file mode 100644
index c89601f..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-
-public abstract class CompatDelegateRegionCoprocessorEnvironment
- implements RegionCoprocessorEnvironment {
-
- protected RegionCoprocessorEnvironment delegate;
-
- @Override
- public MetricRegistry getMetricRegistryForRegionServer() {
- return delegate.getMetricRegistryForRegionServer();
- }
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
deleted file mode 100644
index c6b06f7..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegatingHBaseRpcController.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.ipc.DelegatingHBaseRpcController;
-
-// We need to copy the HBase implementation, because we need to have CompatHBaseRpcController
-// as ancestor, so we cannot simply subclass the HBase Delegating* class
-public abstract class CompatDelegatingHBaseRpcController extends DelegatingHBaseRpcController
- implements CompatHBaseRpcController {
-
- public CompatDelegatingHBaseRpcController(CompatHBaseRpcController delegate) {
- super(delegate);
- }
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
deleted file mode 100644
index a4827f2..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcController.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.ipc.HBaseRpcController;
-
-public interface CompatHBaseRpcController extends HBaseRpcController {
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java
deleted file mode 100644
index 3fc88e3..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatHBaseRpcControllerImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.ipc.HBaseRpcControllerImpl;
-
-public class CompatHBaseRpcControllerImpl extends HBaseRpcControllerImpl
- implements CompatHBaseRpcController {
-
- public CompatHBaseRpcControllerImpl() {
- super();
- }
-
- public CompatHBaseRpcControllerImpl(final CellScanner cellScanner) {
- super(cellScanner);
- }
-
- public CompatHBaseRpcControllerImpl(final List<CellScannable> cellIterables) {
- super(cellIterables);
- }
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
deleted file mode 100644
index 7b71ef8..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRegionCoprocessorEnvironment.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-
-public abstract class CompatRegionCoprocessorEnvironment implements RegionCoprocessorEnvironment {
-
- @Override
- public MetricRegistry getMetricRegistryForRegionServer() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
deleted file mode 100644
index 22bd0eb..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatRpcControllerFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat.hbase;
-
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.CellScannable;
-import org.apache.hadoop.hbase.CellScanner;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-
-public abstract class CompatRpcControllerFactory extends RpcControllerFactory {
-
- public CompatRpcControllerFactory(Configuration conf) {
- super(conf);
- }
-
- @Override
- public CompatHBaseRpcController newController() {
- return new CompatHBaseRpcControllerImpl();
- }
-
- @Override
- public CompatHBaseRpcController newController(final CellScanner cellScanner) {
- return new CompatHBaseRpcControllerImpl(cellScanner);
- }
-
- @Override
- public CompatHBaseRpcController newController(final List<CellScannable> cellIterables) {
- return new CompatHBaseRpcControllerImpl(cellIterables);
- }
-
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index e0ac22f..006aa39 100644
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++ b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -31,18 +31,6 @@ public abstract class CompatUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(
CompatUtil.class);
- public static Class[] getMrMetricsClasses() {
- return new Class[] { Gauge.class, MetricRegistriesImpl.class };
- }
-
- public static Scan setStartRow(Scan scan, byte[] indexRowKey, boolean inclusive) {
- return scan.withStartRow(indexRowKey, inclusive);
- }
-
- public static Scan setSingleRow(Scan scan, byte[] indexRowKey) {
- return scan.withStartRow(indexRowKey, true).withStopRow(indexRowKey, true);
- }
-
/**
* HBase 1.5+ has storeRefCount available in RegionMetrics
*
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
deleted file mode 100644
index d0eb389..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/CompatGlobalClientMetricsRegistry.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.monitoring;
-
-import org.apache.hadoop.hbase.metrics.Gauge;
-import org.apache.hadoop.hbase.metrics.MetricRegistries;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CompatGlobalClientMetricsRegistry {
-
- private static final Logger LOGGER =
- LoggerFactory.getLogger(CompatGlobalClientMetricsRegistry.class);
-
- protected static MetricRegistry metricRegistry;
-
- protected static void createRegistry() {
- LOGGER.info("Creating Metric Registry for Phoenix Global Metrics");
- MetricRegistryInfo registryInfo =
- new MetricRegistryInfo("PHOENIX", "Phoenix Client Metrics", "phoenix",
- "Phoenix,sub=CLIENT", true);
- metricRegistry = MetricRegistries.global().create(registryInfo);
- }
-
- protected static void registerMetricToRegistry(final String name,
- final ValueProvider valueProvider) {
- metricRegistry.register(name, new Gauge<Long>() {
- @Override
- public Long getValue() {
- return valueProvider.getValue();
- }
- });
- }
-
- protected static void registerMetricsAdapter(String metricTag) {
- GlobalMetricRegistriesAdapter.getInstance().registerMetricRegistry(metricRegistry,
- metricTag);
- }
-
- // Glue interface to break dependency on org.apache.hadoop.hbase.metrics.Gauge
- protected interface ValueProvider {
- public Long getValue();
- }
-
-}
diff --git a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java b/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
deleted file mode 100644
index 66556f6..0000000
--- a/phoenix-hbase-compat-1.5.0/src/main/java/org/apache/phoenix/monitoring/GlobalMetricRegistriesAdapter.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.monitoring;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.hbase.metrics.Counter;
-import org.apache.hadoop.hbase.metrics.Gauge;
-import org.apache.hadoop.hbase.metrics.Histogram;
-import org.apache.hadoop.hbase.metrics.Meter;
-import org.apache.hadoop.hbase.metrics.Metric;
-import org.apache.hadoop.hbase.metrics.MetricRegistry;
-import org.apache.hadoop.hbase.metrics.MetricRegistryInfo;
-import org.apache.hadoop.hbase.metrics.Timer;
-import org.apache.hadoop.metrics2.MetricsCollector;
-import org.apache.hadoop.metrics2.MetricsInfo;
-import org.apache.hadoop.metrics2.MetricsRecordBuilder;
-import org.apache.hadoop.metrics2.MetricsSource;
-import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
-import org.apache.hadoop.metrics2.lib.Interns;
-import org.apache.hadoop.metrics2.lib.MutableHistogram;
-import org.apache.hadoop.metrics2.source.JvmMetrics;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Contents mostly copied from GlobalMetricRegistriesAdapter class from hbase-hadoop2-compat The
- * adapter attaches HBase's MetricRegistry to Hadoop's DefaultMetricsSystem
- * Note: This DOES NOT handle dynamic attach/detach of registries
- */
-public class GlobalMetricRegistriesAdapter {
-
- private static final Logger LOGGER =
- LoggerFactory.getLogger(GlobalMetricRegistriesAdapter.class);
- private static GlobalMetricRegistriesAdapter INSTANCE = new GlobalMetricRegistriesAdapter();
-
- private GlobalMetricRegistriesAdapter() {
- DefaultMetricsSystem.initialize("Phoenix");
- JvmMetrics.initSingleton("Phoenix", "");
- }
-
- public static GlobalMetricRegistriesAdapter getInstance() {
- return INSTANCE;
- }
-
- public void registerMetricRegistry(MetricRegistry registry, String metricTag) {
- if (registry == null) {
- LOGGER.warn("Registry cannot be registered with Hadoop Metrics 2 since it is null.");
- return;
- }
-
- HBaseMetrics2HadoopMetricsAdapter adapter =
- new HBaseMetrics2HadoopMetricsAdapter(registry, metricTag);
- adapter.registerToDefaultMetricsSystem();
- }
-
- /**
- * Class to convert HBase Metric Objects to Hadoop Metrics2 Metric Objects
- */
- private static class HBaseMetrics2HadoopMetricsAdapter implements MetricsSource {
- private static final Logger LOGGER =
- LoggerFactory.getLogger(HBaseMetrics2HadoopMetricsAdapter.class);
- private final MetricRegistry registry;
- private final String metricTag;
-
- private HBaseMetrics2HadoopMetricsAdapter(MetricRegistry registry, String tag) {
- this.registry = registry;
- this.metricTag = tag;
- }
-
- private void registerToDefaultMetricsSystem() {
- MetricRegistryInfo info = registry.getMetricRegistryInfo();
- LOGGER.info("Registering " + info.getMetricsJmxContext() + " "
- + info.getMetricsDescription() + " into DefaultMetricsSystem");
- DefaultMetricsSystem.instance().register(info.getMetricsJmxContext(),
- info.getMetricsDescription(), this);
- }
-
- private void snapshotAllMetrics(MetricRegistry metricRegistry, MetricsCollector collector) {
- MetricRegistryInfo hbaseMetricRegistryInfo = metricRegistry.getMetricRegistryInfo();
- MetricsInfo hadoopMetricsInfo =
- Interns.info(hbaseMetricRegistryInfo.getMetricsName(),
- hbaseMetricRegistryInfo.getMetricsDescription());
- MetricsRecordBuilder builder = collector.addRecord(hadoopMetricsInfo);
- builder.setContext(hbaseMetricRegistryInfo.getMetricsContext());
- builder.tag(hadoopMetricsInfo, metricTag);
- this.snapshotAllMetrics(metricRegistry, builder);
- }
-
- private void snapshotAllMetrics(MetricRegistry metricRegistry,
- MetricsRecordBuilder builder) {
- Map<String, Metric> metrics = metricRegistry.getMetrics();
- Iterator iterator = metrics.entrySet().iterator();
-
- while (iterator.hasNext()) {
- Entry<String, Metric> e = (Entry) iterator.next();
- String name = StringUtils.capitalize(e.getKey());
- Metric metric = e.getValue();
- if (metric instanceof Gauge) {
- this.addGauge(name, (Gauge) metric, builder);
- } else if (metric instanceof Counter) {
- this.addCounter(name, (Counter) metric, builder);
- } else if (metric instanceof Histogram) {
- this.addHistogram(name, (Histogram) metric, builder);
- } else if (metric instanceof Meter) {
- this.addMeter(name, (Meter) metric, builder);
- } else if (metric instanceof Timer) {
- this.addTimer(name, (Timer) metric, builder);
- } else {
- LOGGER.info("Ignoring unknown Metric class " + metric.getClass().getName());
- }
- }
- }
-
- private void addGauge(String name, Gauge<?> gauge, MetricsRecordBuilder builder) {
- MetricsInfo info = Interns.info(name, "");
- Object o = gauge.getValue();
- if (o instanceof Integer) {
- builder.addGauge(info, (Integer) o);
- } else if (o instanceof Long) {
- builder.addGauge(info, (Long) o);
- } else if (o instanceof Float) {
- builder.addGauge(info, (Float) o);
- } else if (o instanceof Double) {
- builder.addGauge(info, (Double) o);
- } else {
- LOGGER.warn("Ignoring Gauge (" + name + ") with unhandled type: " + o.getClass());
- }
-
- }
-
- private void addCounter(String name, Counter counter, MetricsRecordBuilder builder) {
- MetricsInfo info = Interns.info(name, "");
- builder.addCounter(info, counter.getCount());
- }
-
- private void addHistogram(String name, Histogram histogram, MetricsRecordBuilder builder) {
- MutableHistogram.snapshot(name, "", histogram, builder, true);
- }
-
- private void addMeter(String name, Meter meter, MetricsRecordBuilder builder) {
- builder.addGauge(Interns.info(name + "_count", ""), meter.getCount());
- builder.addGauge(Interns.info(name + "_mean_rate", ""), meter.getMeanRate());
- builder.addGauge(Interns.info(name + "_1min_rate", ""), meter.getOneMinuteRate());
- builder.addGauge(Interns.info(name + "_5min_rate", ""), meter.getFiveMinuteRate());
- builder.addGauge(Interns.info(name + "_15min_rate", ""), meter.getFifteenMinuteRate());
- }
-
- private void addTimer(String name, Timer timer, MetricsRecordBuilder builder) {
- this.addMeter(name, timer.getMeter(), builder);
- this.addHistogram(name, timer.getHistogram(), builder);
- }
-
- @Override
- public void getMetrics(MetricsCollector metricsCollector, boolean b) {
- this.snapshotAllMetrics(this.registry, metricsCollector);
- }
-
- }
-}
diff --git a/pom.xml b/pom.xml
index 68dca81..c0caa84 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,6 @@
<modules>
<module>phoenix-hbase-compat-1.5.0</module>
<module>phoenix-hbase-compat-1.4.0</module>
- <module>phoenix-hbase-compat-1.3.0</module>
<module>phoenix-core</module>
<module>phoenix-pherf</module>
<module>phoenix-client-parent</module>
@@ -84,9 +83,8 @@
<phoenix.thirdparty.version>1.1.0</phoenix.thirdparty.version>
<!-- This is used by the release script only -->
- <hbase.profile.list>1.3 1.4 1.5 1.6</hbase.profile.list>
+ <hbase.profile.list>1.4 1.5 1.6</hbase.profile.list>
<!-- The default hbase versions to build with (override with hbase.version) -->
- <hbase-1.3.runtime.version>1.3.5</hbase-1.3.runtime.version>
<hbase-1.4.runtime.version>1.4.10</hbase-1.4.runtime.version>
<hbase-1.5.runtime.version>1.5.0</hbase-1.5.runtime.version>
<hbase-1.6.runtime.version>1.6.0</hbase-1.6.runtime.version>
@@ -576,11 +574,6 @@
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
- <artifactId>phoenix-client-hbase-1.3</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client-hbase-1.4</artifactId>
<version>${project.version}</version>
</dependency>
@@ -596,11 +589,6 @@
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
- <artifactId>phoenix-client-embedded-hbase-1.3</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client-embedded-hbase-1.4</artifactId>
<version>${project.version}</version>
</dependency>
@@ -616,11 +604,6 @@
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
- <artifactId>phoenix-server-hbase-1.3</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-server-hbase-1.4</artifactId>
<version>${project.version}</version>
</dependency>
@@ -654,11 +637,6 @@
<artifactId>phoenix-hbase-compat-1.4.0</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.phoenix</groupId>
- <artifactId>phoenix-hbase-compat-1.3.0</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- TODO Remove PQS and connector dependency rules -->
<dependency>
<groupId>org.apache.phoenix</groupId>
@@ -1216,21 +1194,6 @@
</properties>
</profile>
<profile>
- <id>phoenix-hbase-compat-1.3.0</id>
- <activation>
- <property>
- <name>hbase.profile</name>
- <value>1.3</value>
- </property>
- </activation>
- <properties>
- <hbase.profile>1.3</hbase.profile>
- <hbase.compat.version>1.3.0</hbase.compat.version>
- <hbase.version>${hbase-1.3.runtime.version}</hbase.version>
- <tephra.hbase.compat.version>1.3</tephra.hbase.compat.version>
- </properties>
- </profile>
- <profile>
<id>phoenix-hbase-compat-1.4.0</id>
<activation>
<property>