This is an automated email from the ASF dual-hosted git repository.
richardantal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new ce17ec1daa PHOENIX-7172: Support HBase 2.6 (#1793)
ce17ec1daa is described below
commit ce17ec1daaa4f064d798ea246909d611eaf61e92
Author: richardantal <[email protected]>
AuthorDate: Tue Jun 18 12:32:57 2024 +0200
PHOENIX-7172: Support HBase 2.6 (#1793)
---
phoenix-assembly/pom.xml | 5 +
phoenix-core-client/pom.xml | 3 +
.../phoenix/transaction/OmidTransactionTable.java | 26 -----
.../regionserver/IndexHalfStoreFileReader.java | 9 +-
.../regionserver/LocalIndexStoreFileScanner.java | 9 +-
.../hbase/regionserver/wal/IndexedHLogReader.java | 10 +-
.../phoenix/compat/hbase/CompatDelegateHTable.java | 13 ++-
.../hbase/CompatIndexHalfStoreFileReader.java | 40 ++++++++
.../compat/hbase/CompatIndexedHLogReader.java | 31 ++++++
.../hbase/CompatLocalIndexStoreFileScanner.java | 33 ++++++
.../compat/hbase/CompatOmidTransactionTable.java | 42 ++++++--
.../compat/hbase/CompatPhoenixRpcScheduler.java | 13 ++-
.../apache/phoenix/compat/hbase/CompatUtil.java | 15 ++-
.../compat/hbase/HbaseCompatCapabilities.java | 13 ++-
.../hbase/ReplicationSinkCompatEndpoint.java | 21 ++--
.../phoenix/compat/hbase/CompatDelegateHTable.java | 13 ++-
.../hbase/CompatIndexHalfStoreFileReader.java | 40 ++++++++
.../compat/hbase/CompatIndexedHLogReader.java | 31 ++++++
.../hbase/CompatLocalIndexStoreFileScanner.java | 34 +++++++
.../compat/hbase/CompatOmidTransactionTable.java | 42 ++++++--
.../compat/hbase/CompatPhoenixRpcScheduler.java | 13 ++-
.../apache/phoenix/compat/hbase/CompatUtil.java | 15 ++-
.../compat/hbase/HbaseCompatCapabilities.java | 13 ++-
.../hbase/ReplicationSinkCompatEndpoint.java | 21 ++--
.../phoenix/compat/hbase/CompatDelegateHTable.java | 13 ++-
.../hbase/CompatIndexHalfStoreFileReader.java | 40 ++++++++
.../compat/hbase/CompatIndexedHLogReader.java | 32 ++++++
.../hbase/CompatLocalIndexStoreFileScanner.java | 33 ++++++
.../compat/hbase/CompatOmidTransactionTable.java | 42 ++++++--
.../compat/hbase/CompatPhoenixRpcScheduler.java | 13 ++-
.../apache/phoenix/compat/hbase/CompatUtil.java | 15 ++-
.../compat/hbase/HbaseCompatCapabilities.java | 13 ++-
.../hbase/ReplicationSinkCompatEndpoint.java | 21 ++--
phoenix-hbase-compat-2.6.0/pom.xml | 113 +++++++++++++++++++++
.../phoenix/compat/hbase/CompatDelegateHTable.java | 13 ++-
.../hbase/CompatIndexHalfStoreFileReader.java | 42 ++++++++
.../compat/hbase/CompatIndexedHLogReader.java | 23 +++++
.../hbase/CompatLocalIndexStoreFileScanner.java | 35 +++++++
.../compat/hbase/CompatOmidTransactionTable.java | 78 ++++++++++++++
.../compat/hbase/CompatPhoenixRpcScheduler.java | 27 +++--
.../apache/phoenix/compat/hbase/CompatUtil.java | 15 ++-
.../compat/hbase/HbaseCompatCapabilities.java | 13 ++-
.../hbase/ReplicationSinkCompatEndpoint.java | 21 ++--
pom.xml | 45 +++++++-
44 files changed, 924 insertions(+), 228 deletions(-)
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index cf963a1b1f..0ff54a34ff 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -276,6 +276,11 @@
<artifactId>phoenix-hbase-compat-2.5.4</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-hbase-compat-2.6.0</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</profile>
</profiles>
diff --git a/phoenix-core-client/pom.xml b/phoenix-core-client/pom.xml
index c036d1e377..b926a0d302 100644
--- a/phoenix-core-client/pom.xml
+++ b/phoenix-core-client/pom.xml
@@ -66,6 +66,9 @@
|| ("${hbase.compat.version}".equals("2.5.4")
&& hbaseMinor == 5
&& hbasePatch >=4)
+ || ("${hbase.compat.version}".equals("2.6.0")
+ && hbaseMinor == 6
+ && hbasePatch >=0)
)
</condition>
</evaluateBeanshell>
diff --git
a/phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
b/phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
index 0e9ddb41a5..483a52b725 100644
---
a/phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
+++
b/phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
@@ -44,7 +44,6 @@ import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.client.TableDescriptor;
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.omid.transaction.TTable;
import org.apache.omid.transaction.Transaction;
@@ -193,25 +192,12 @@ public class OmidTransactionTable extends
CompatOmidTransactionTable implements
throw new UnsupportedOperationException();
}
- @Override
- public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
- CompareOp compareOp, byte[] value, Put put) throws IOException {
- throw new UnsupportedOperationException();
- }
-
@Override
public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
byte[] value, Delete delete) throws IOException {
throw new UnsupportedOperationException();
}
- @Override
- public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
- CompareOp compareOp, byte[] value, Delete delete)
- throws IOException {
- throw new UnsupportedOperationException();
- }
-
@Override
public Result append(Append append) throws IOException {
throw new UnsupportedOperationException();
@@ -270,13 +256,6 @@ public class OmidTransactionTable extends
CompatOmidTransactionTable implements
throw new UnsupportedOperationException();
}
- @Override
- public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
- CompareOp compareOp, byte[] value, RowMutations mutation)
- throws IOException {
- throw new UnsupportedOperationException();
- }
-
@Override
public int getOperationTimeout() {
throw new UnsupportedOperationException();
@@ -339,11 +318,6 @@ public class OmidTransactionTable extends
CompatOmidTransactionTable implements
throw new UnsupportedOperationException();
}
- @Override
- public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
- throw new UnsupportedOperationException();
- }
-
@Override
public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
CompareOperator op, byte[] value,
RowMutations mutation) throws IOException {
diff --git
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
index b4fe37952f..901c48815d 100644
---
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
+++
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReader.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.io.hfile.ReaderContext;
import org.apache.hadoop.hbase.io.hfile.ReaderContext.ReaderType;
import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.compat.hbase.CompatIndexHalfStoreFileReader;
import org.apache.phoenix.index.IndexMaintainer;
/**
@@ -56,7 +57,7 @@ import org.apache.phoenix.index.IndexMaintainer;
* This file is not splitable. Calls to #midkey() return null.
*/
-public class IndexHalfStoreFileReader extends StoreFileReader {
+public class IndexHalfStoreFileReader extends CompatIndexHalfStoreFileReader {
private final boolean top;
// This is the key we split around. Its the first possible entry on a row:
// i.e. empty column and a timestamp of LATEST_TIMESTAMP.
@@ -92,11 +93,11 @@ public class IndexHalfStoreFileReader extends
StoreFileReader {
final byte[][] viewConstants, final RegionInfo regionInfo,
byte[] regionStartKeyInHFile, byte[] splitKey, boolean
primaryReplicaStoreFile,
AtomicInteger refCount, RegionInfo currentRegion) throws
IOException {
- super(new ReaderContext(p, in, size, new HFileSystem(fs),
primaryReplicaStoreFile,
+ super(fs, cacheConf, conf, new ReaderContext(p, in, size, new
HFileSystem(fs),
+ primaryReplicaStoreFile,
ReaderType.STREAM),
new HFileInfo(new ReaderContext(p, in, size, new HFileSystem(fs),
- primaryReplicaStoreFile, ReaderType.STREAM), conf),
- cacheConf, refCount, conf);
+ primaryReplicaStoreFile, ReaderType.STREAM), conf), p);
getHFileReader().getHFileInfo().initMetaAndIndex(getHFileReader());
this.splitkey = splitKey == null ? r.getSplitKey() : splitKey;
// Is it top or bottom half?
diff --git
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
index 4952e70749..8d10bde881 100644
---
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
+++
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/LocalIndexStoreFileScanner.java
@@ -31,12 +31,13 @@ import org.apache.hadoop.hbase.KeyValue.Type;
import org.apache.hadoop.hbase.KeyValueUtil;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.compat.hbase.CompatLocalIndexStoreFileScanner;
import org.apache.phoenix.index.IndexMaintainer;
import org.apache.phoenix.util.PhoenixKeyValueUtil;
import static org.apache.hadoop.hbase.KeyValue.ROW_LENGTH_SIZE;
-public class LocalIndexStoreFileScanner extends StoreFileScanner{
+public class LocalIndexStoreFileScanner extends
CompatLocalIndexStoreFileScanner {
private IndexHalfStoreFileReader reader;
private boolean changeBottomKeys;
@@ -45,13 +46,13 @@ public class LocalIndexStoreFileScanner extends
StoreFileScanner{
public LocalIndexStoreFileScanner(IndexHalfStoreFileReader reader, boolean
cacheBlocks, boolean pread,
boolean isCompaction, long readPt, long scannerOrder,
boolean canOptimizeForNonNullColumn) {
- super(reader, reader.getScanner(cacheBlocks, pread, isCompaction),
!isCompaction, reader
- .getHFileReader().hasMVCCInfo(), readPt, scannerOrder,
canOptimizeForNonNullColumn);
+ super(reader, cacheBlocks, pread, isCompaction, readPt, scannerOrder,
+ canOptimizeForNonNullColumn);
this.reader = reader;
this.changeBottomKeys =
this.reader.getRegionInfo().getStartKey().length == 0
&& this.reader.getSplitRow().length !=
this.reader.getOffset();
- this.comparator = (CellComparatorImpl)getComparator();
+ this.comparator = (CellComparatorImpl) reader.getComparator();
}
@Override
diff --git
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedHLogReader.java
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedHLogReader.java
index f6abb1e081..0f6c8a6430 100644
---
a/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedHLogReader.java
+++
b/phoenix-core-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/IndexedHLogReader.java
@@ -18,8 +18,7 @@
package org.apache.hadoop.hbase.regionserver.wal;
-import java.io.IOException;
-
+import org.apache.phoenix.compat.hbase.CompatIndexedHLogReader;
/**
@@ -39,11 +38,6 @@ import java.io.IOException;
* we need to track which of the regions were on the server when it crashed
only only split those
* edits out into their respective regions.
*/
-public class IndexedHLogReader extends ProtobufLogReader {
+public class IndexedHLogReader extends CompatIndexedHLogReader {
- @Override
- protected void initAfterCompression() throws IOException {
- conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY,
IndexedWALEditCodec.class.getName());
- super.initAfterCompression();
- }
}
\ No newline at end of file
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
index b6e360cba4..47cf21d4cb 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
new file mode 100644
index 0000000000..20d0eaae6d
--- /dev/null
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
@@ -0,0 +1,40 @@
+/*
+ * 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.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
+import org.apache.hadoop.hbase.io.hfile.ReaderContext;
+import org.apache.hadoop.hbase.regionserver.StoreFileReader;
+
+public class CompatIndexHalfStoreFileReader extends StoreFileReader {
+
+ public CompatIndexHalfStoreFileReader(final FileSystem fs, final
CacheConfig cacheConf,
+ final Configuration conf,
+ final ReaderContext readerContext,
+ final HFileInfo hFileInfo, Path p)
throws IOException {
+ super(readerContext, hFileInfo, cacheConf, new AtomicInteger(0), conf);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
new file mode 100644
index 0000000000..45681c4523
--- /dev/null
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
@@ -0,0 +1,31 @@
+/*
+ * 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.io.IOException;
+
+import org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader;
+import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
+
+public abstract class CompatIndexedHLogReader extends ProtobufLogReader {
+ @Override
+ protected void initAfterCompression() throws IOException {
+ conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY,
+
"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec");
+ super.initAfterCompression();
+ }
+}
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
new file mode 100644
index 0000000000..4939fdb4ca
--- /dev/null
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
@@ -0,0 +1,33 @@
+/*
+ * 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.regionserver.StoreFileScanner;
+
+
+public class CompatLocalIndexStoreFileScanner extends StoreFileScanner {
+
+ public CompatLocalIndexStoreFileScanner(CompatIndexHalfStoreFileReader
reader,
+ boolean cacheBlocks, boolean pread,
+ boolean isCompaction, long readPt,
long scannerOrder,
+ boolean
canOptimizeForNonNullColumn) {
+ super(reader, reader.getScanner(cacheBlocks, pread, isCompaction),
!isCompaction, reader
+ .getHFileReader().hasMVCCInfo(), readPt, scannerOrder,
canOptimizeForNonNullColumn);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
index b2997a86a1..c4c98c6892 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -20,9 +19,13 @@ package org.apache.phoenix.compat.hbase;
import java.io.IOException;
import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
public abstract class CompatOmidTransactionTable implements Table {
@@ -41,4 +44,29 @@ public abstract class CompatOmidTransactionTable implements
Table {
public Result mutateRow(RowMutations rm) throws IOException {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Put put)
throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Delete
delete)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value,
RowMutations mutation)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
index b8a255a7e9..45dab14771 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index e5084bf6f4..671bed3dad 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -23,10 +22,8 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.MetaTableAccessor;
-import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
index 9fc812c655..ed892093dc 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
index 7415e666af..05ca87b9f7 100644
---
a/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
+++
b/phoenix-hbase-compat-2.4.1/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -18,6 +17,10 @@
package org.apache.phoenix.compat.hbase;
+import java.io.IOException;
+import java.util.List;
+import java.util.Optional;
+
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
@@ -26,10 +29,6 @@ import
org.apache.hadoop.hbase.coprocessor.RegionServerObserver;
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-
/**
* Replication Sink compat endpoint that helps attach WAL attributes to
* mutation. In order to do so, this endpoint utilizes regionserver hook
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
index a255732eff..8e6dca1b79 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
new file mode 100644
index 0000000000..20d0eaae6d
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
@@ -0,0 +1,40 @@
+/*
+ * 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.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
+import org.apache.hadoop.hbase.io.hfile.ReaderContext;
+import org.apache.hadoop.hbase.regionserver.StoreFileReader;
+
+public class CompatIndexHalfStoreFileReader extends StoreFileReader {
+
+ public CompatIndexHalfStoreFileReader(final FileSystem fs, final
CacheConfig cacheConf,
+ final Configuration conf,
+ final ReaderContext readerContext,
+ final HFileInfo hFileInfo, Path p)
throws IOException {
+ super(readerContext, hFileInfo, cacheConf, new AtomicInteger(0), conf);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
new file mode 100644
index 0000000000..45681c4523
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
@@ -0,0 +1,31 @@
+/*
+ * 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.io.IOException;
+
+import org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader;
+import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
+
+public abstract class CompatIndexedHLogReader extends ProtobufLogReader {
+ @Override
+ protected void initAfterCompression() throws IOException {
+ conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY,
+
"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec");
+ super.initAfterCompression();
+ }
+}
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
new file mode 100644
index 0000000000..780e841dee
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
@@ -0,0 +1,34 @@
+/*
+ * 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.regionserver.StoreFileScanner;
+
+
+public class CompatLocalIndexStoreFileScanner extends StoreFileScanner {
+
+ public CompatLocalIndexStoreFileScanner(CompatIndexHalfStoreFileReader
reader,
+ boolean cacheBlocks, boolean pread,
+ boolean isCompaction, long readPt,
long scannerOrder,
+ boolean
canOptimizeForNonNullColumn) {
+ super(reader, reader.getScanner(cacheBlocks, pread, isCompaction),
!isCompaction,
+ reader.getHFileReader().hasMVCCInfo(), readPt, scannerOrder,
+ canOptimizeForNonNullColumn);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
index 6531a49875..cfbfe40775 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -20,10 +19,14 @@ package org.apache.phoenix.compat.hbase;
import java.io.IOException;
import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.RegionLocator;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
public abstract class CompatOmidTransactionTable implements Table {
@@ -47,4 +50,29 @@ public abstract class CompatOmidTransactionTable implements
Table {
public Result mutateRow(RowMutations rm) throws IOException {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Put put)
throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Delete
delete)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value,
RowMutations mutation)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
index cb47f8291b..22c792b6fe 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index f956d227c6..51f681ab02 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -23,10 +22,8 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.MetaTableAccessor;
-import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
index 9fc812c655..ed892093dc 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
index 7415e666af..05ca87b9f7 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
+++
b/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -18,6 +17,10 @@
package org.apache.phoenix.compat.hbase;
+import java.io.IOException;
+import java.util.List;
+import java.util.Optional;
+
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
@@ -26,10 +29,6 @@ import
org.apache.hadoop.hbase.coprocessor.RegionServerObserver;
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-
/**
* Replication Sink compat endpoint that helps attach WAL attributes to
* mutation. In order to do so, this endpoint utilizes regionserver hook
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
index a255732eff..8e6dca1b79 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
new file mode 100644
index 0000000000..20d0eaae6d
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
@@ -0,0 +1,40 @@
+/*
+ * 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.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
+import org.apache.hadoop.hbase.io.hfile.ReaderContext;
+import org.apache.hadoop.hbase.regionserver.StoreFileReader;
+
+public class CompatIndexHalfStoreFileReader extends StoreFileReader {
+
+ public CompatIndexHalfStoreFileReader(final FileSystem fs, final
CacheConfig cacheConf,
+ final Configuration conf,
+ final ReaderContext readerContext,
+ final HFileInfo hFileInfo, Path p)
throws IOException {
+ super(readerContext, hFileInfo, cacheConf, new AtomicInteger(0), conf);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
new file mode 100644
index 0000000000..14ab6c1c27
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
@@ -0,0 +1,32 @@
+/*
+ * 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.io.IOException;
+
+import org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader;
+import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
+
+
+public abstract class CompatIndexedHLogReader extends ProtobufLogReader {
+ @Override
+ protected void initAfterCompression() throws IOException {
+ conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY,
+ "org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec");
+ super.initAfterCompression();
+ }
+}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
new file mode 100644
index 0000000000..4939fdb4ca
--- /dev/null
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
@@ -0,0 +1,33 @@
+/*
+ * 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.regionserver.StoreFileScanner;
+
+
+public class CompatLocalIndexStoreFileScanner extends StoreFileScanner {
+
+ public CompatLocalIndexStoreFileScanner(CompatIndexHalfStoreFileReader
reader,
+ boolean cacheBlocks, boolean pread,
+ boolean isCompaction, long readPt,
long scannerOrder,
+ boolean
canOptimizeForNonNullColumn) {
+ super(reader, reader.getScanner(cacheBlocks, pread, isCompaction),
!isCompaction, reader
+ .getHFileReader().hasMVCCInfo(), readPt, scannerOrder,
canOptimizeForNonNullColumn);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
index 6531a49875..cfbfe40775 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -20,10 +19,14 @@ package org.apache.phoenix.compat.hbase;
import java.io.IOException;
import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.RegionLocator;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
public abstract class CompatOmidTransactionTable implements Table {
@@ -47,4 +50,29 @@ public abstract class CompatOmidTransactionTable implements
Table {
public Result mutateRow(RowMutations rm) throws IOException {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Put put)
throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Delete
delete)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value,
RowMutations mutation)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
index cb47f8291b..22c792b6fe 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index 371154d560..0182a7162e 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -23,10 +22,8 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.MetaTableAccessor;
-import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
index 9fc812c655..ed892093dc 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
index 7415e666af..05ca87b9f7 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
+++
b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -18,6 +17,10 @@
package org.apache.phoenix.compat.hbase;
+import java.io.IOException;
+import java.util.List;
+import java.util.Optional;
+
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
@@ -26,10 +29,6 @@ import
org.apache.hadoop.hbase.coprocessor.RegionServerObserver;
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-
/**
* Replication Sink compat endpoint that helps attach WAL attributes to
* mutation. In order to do so, this endpoint utilizes regionserver hook
diff --git a/phoenix-hbase-compat-2.6.0/pom.xml
b/phoenix-hbase-compat-2.6.0/pom.xml
new file mode 100644
index 0000000000..da0ac4ab48
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.0/pom.xml
@@ -0,0 +1,113 @@
+<?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>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix</artifactId>
+ <version>5.3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>phoenix-hbase-compat-2.6.0</artifactId>
+ <name>Phoenix Hbase 2.6.0 compatibility</name>
+ <description>Compatibility module for HBase 2.6.0+</description>
+
+ <properties>
+ <hbase26.compat.version>2.6.0-hadoop3</hbase26.compat.version>
+ </properties>
+
+ <dependencies>
+ <!-- HBase dependencies -->
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-client</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-common</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-server</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Override parent dependencyManagement for transitive HBase
dependencies -->
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-hadoop-compat</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-hadoop2-compat</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-protocol</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-protocol-shaded</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-zookeeper</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-metrics</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-metrics-api</artifactId>
+ <version>${hbase26.compat.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Build with -Dwithout.tephra fails without this -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
similarity index 72%
copy from
phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
copy to
phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
index a255732eff..8e6dca1b79 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
new file mode 100644
index 0000000000..d046c3df8e
--- /dev/null
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
@@ -0,0 +1,42 @@
+/*
+ * 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.io.IOException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
+import org.apache.hadoop.hbase.io.hfile.ReaderContext;
+import org.apache.hadoop.hbase.regionserver.StoreFileInfo;
+import org.apache.hadoop.hbase.regionserver.StoreFileReader;
+
+
+public class CompatIndexHalfStoreFileReader extends StoreFileReader {
+
+ public CompatIndexHalfStoreFileReader(final FileSystem fs, final
CacheConfig cacheConf,
+ final Configuration conf,
+ final ReaderContext readerContext,
+ final HFileInfo hFileInfo, Path p)
throws IOException {
+ super(readerContext, hFileInfo, cacheConf,
+ new StoreFileInfo(conf, fs, p, true), conf);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
new file mode 100644
index 0000000000..6bf1602ec6
--- /dev/null
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
@@ -0,0 +1,23 @@
+/*
+ * 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.regionserver.wal.ProtobufWALStreamReader;
+
+public abstract class CompatIndexedHLogReader extends ProtobufWALStreamReader {
+
+}
diff --git
a/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
new file mode 100644
index 0000000000..5e4e3497a7
--- /dev/null
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
@@ -0,0 +1,35 @@
+/*
+ * 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.io.encoding.DataBlockEncoding;
+import org.apache.hadoop.hbase.regionserver.StoreFileScanner;
+
+
+public class CompatLocalIndexStoreFileScanner extends StoreFileScanner {
+
+ public CompatLocalIndexStoreFileScanner(CompatIndexHalfStoreFileReader
reader,
+ boolean cacheBlocks, boolean pread,
+ boolean isCompaction, long readPt,
long scannerOrder,
+ boolean
canOptimizeForNonNullColumn) {
+ super(reader, reader.getScanner(cacheBlocks, pread, isCompaction),
!isCompaction, reader
+ .getHFileReader().hasMVCCInfo(), readPt, scannerOrder,
canOptimizeForNonNullColumn,
+ reader.getHFileReader().getDataBlockEncoding() ==
DataBlockEncoding.ROW_INDEX_V1);
+ }
+
+
+}
diff --git
a/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
new file mode 100644
index 0000000000..81e4a1873f
--- /dev/null
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
@@ -0,0 +1,78 @@
+/*
+ * 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.io.IOException;
+
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.RegionLocator;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.RowMutations;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
+
+public abstract class CompatOmidTransactionTable implements Table {
+
+ protected Table hTable;
+
+ public CompatOmidTransactionTable(Table hTable) {
+ this.hTable = hTable;
+ }
+
+ @Override
+ public HTableDescriptor getTableDescriptor() throws IOException {
+ return hTable.getTableDescriptor();
+ }
+
+ @Override
+ public RegionLocator getRegionLocator() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Result mutateRow(RowMutations rm) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Put put) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, Delete delete)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+ CompareOp compareOp, byte[] value, RowMutations mutation)
+ throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
similarity index 60%
copy from
phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
copy to
phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
index cb47f8291b..4303301bed 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -39,6 +38,20 @@ public abstract class CompatPhoenixRpcScheduler extends
RpcScheduler {
}
}
+ public int getActiveRpcHandlerCount() {
+ return delegate.getActiveRpcHandlerCount();
+ }
+
+ @Override
+ public int getActiveBulkLoadRpcHandlerCount() {
+ return delegate.getActiveBulkLoadRpcHandlerCount();
+ }
+
+ @Override
+ public int getBulkLoadQueueLength() {
+ return delegate.getBulkLoadQueueLength();
+ }
+
public abstract boolean compatDispatch(CallRunner task)
throws IOException, InterruptedException;
}
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
similarity index 83%
copy from
phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
copy to
phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
index 371154d560..0182a7162e 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -23,10 +22,8 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.MetaTableAccessor;
-import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
diff --git
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
similarity index 57%
copy from
phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
copy to
phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
index 9fc812c655..ed892093dc 100644
---
a/phoenix-hbase-compat-2.5.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
diff --git
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
similarity index 84%
copy from
phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
copy to
phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
index 7415e666af..05ca87b9f7 100644
---
a/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
+++
b/phoenix-hbase-compat-2.6.0/src/main/java/org/apache/phoenix/compat/hbase/ReplicationSinkCompatEndpoint.java
@@ -1,11 +1,10 @@
/*
- * 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
+ * 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
*
@@ -18,6 +17,10 @@
package org.apache.phoenix.compat.hbase;
+import java.io.IOException;
+import java.util.List;
+import java.util.Optional;
+
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessor;
@@ -26,10 +29,6 @@ import
org.apache.hadoop.hbase.coprocessor.RegionServerObserver;
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-
/**
* Replication Sink compat endpoint that helps attach WAL attributes to
* mutation. In order to do so, this endpoint utilizes regionserver hook
diff --git a/pom.xml b/pom.xml
index dc82399731..7c5b0501e7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,6 +40,7 @@
</organization>
<modules>
+ <module>phoenix-hbase-compat-2.6.0</module>
<module>phoenix-hbase-compat-2.5.4</module>
<module>phoenix-hbase-compat-2.5.0</module>
<module>phoenix-hbase-compat-2.4.1</module>
@@ -80,11 +81,12 @@
<hbase.suffix>hbase-${hbase.profile}</hbase.suffix>
<!-- This is used by the release script only -->
- <hbase.profile.list>2.4 2.5.0 2.5</hbase.profile.list>
+ <hbase.profile.list>2.4 2.5.0 2.5 2.6</hbase.profile.list>
<!-- The default hbase versions to build with (override with
hbase.version) -->
<hbase-2.4.runtime.version>2.4.18</hbase-2.4.runtime.version>
<hbase-2.5.0.runtime.version>2.5.3-hadoop3</hbase-2.5.0.runtime.version>
<hbase-2.5.runtime.version>2.5.8-hadoop3</hbase-2.5.runtime.version>
+ <hbase-2.6.runtime.version>2.6.0-hadoop3</hbase-2.6.runtime.version>
<compileSource>1.8</compileSource>
<maven.compiler.source>${compileSource}</maven.compiler.source>
@@ -717,6 +719,11 @@
<artifactId>phoenix-client-embedded-hbase-2.5</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-client-embedded-hbase-2.6</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client-lite-hbase-2.4</artifactId>
@@ -732,6 +739,11 @@
<artifactId>phoenix-client-lite-hbase-2.5</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-client-lite-hbase-2.6</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-server-hbase-2.4</artifactId>
@@ -747,6 +759,11 @@
<artifactId>phoenix-server-hbase-2.5</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-server-hbase-2.6</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.4</artifactId>
@@ -762,6 +779,11 @@
<artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.5</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.6</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-pherf</artifactId>
@@ -792,6 +814,11 @@
<artifactId>phoenix-hbase-compat-2.5.4</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-hbase-compat-2.6.0</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<!-- Intra-project test dependencies -->
<dependency>
<groupId>org.apache.phoenix</groupId>
@@ -1863,6 +1890,22 @@
<hbase.version>${hbase-2.5.0.runtime.version}</hbase.version>
</properties>
</profile>
+ <profile>
+ <!-- This WILL work with the public -hadoop3 artifacts -->
+ <id>phoenix-hbase-compat-2.6.0</id>
+ <activation>
+ <property>
+ <name>hbase.profile</name>
+ <value>2.6</value>
+ </property>
+ </activation>
+ <properties>
+ <hbase.profile>2.6</hbase.profile>
+ <hbase.compat.version>2.6.0</hbase.compat.version>
+ <hadoop.version>3.3.5</hadoop.version>
+ <hbase.version>${hbase-2.6.runtime.version}</hbase.version>
+ </properties>
+ </profile>
<profile>
<id>owasp-dependency-check</id>
<activation>