diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index d7a669e2871..ae52be7d23e 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -252,6 +252,11 @@
phoenix-hbase-compat-2.6.0
${project.version}
+
+ org.apache.phoenix
+ phoenix-hbase-compat-2.6.4
+ ${project.version}
+
diff --git a/phoenix-core-client/pom.xml b/phoenix-core-client/pom.xml
index e67be38cb0c..6c6cea359e6 100644
--- a/phoenix-core-client/pom.xml
+++ b/phoenix-core-client/pom.xml
@@ -292,6 +292,9 @@
|| ("${hbase.compat.version}".equals("2.6.0")
&& hbaseMinor == 6
&& hbasePatch >=0)
+ || ("${hbase.compat.version}".equals("2.6.4")
+ && hbaseMinor == 6
+ && hbasePatch >=4)
)
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 338991e8456..cb78e9a7c1e 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
@@ -79,7 +79,7 @@ public IndexHalfStoreFileReader(final FileSystem fs, final Path p, final CacheCo
ReaderType.STREAM),
new HFileInfo(new ReaderContext(p, in, size, new HFileSystem(fs), primaryReplicaStoreFile,
ReaderType.STREAM), conf),
- p);
+ p, r);
getHFileReader().getHFileInfo().initMetaAndIndex(getHFileReader());
this.splitkey = splitKey == null ? r.getSplitKey() : splitKey;
// Is it top or bottom half?
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
index 58225bdd7a0..7c085422555 100644
--- 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
@@ -22,6 +22,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.Reference;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.io.hfile.ReaderContext;
@@ -30,8 +31,8 @@
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 {
+ final Configuration conf, final ReaderContext readerContext, final HFileInfo hFileInfo, Path p,
+ Reference r) 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/CompatIndexHalfStoreFileReader.java b/phoenix-hbase-compat-2.5.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
index 58225bdd7a0..7c085422555 100644
--- 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
@@ -22,6 +22,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.Reference;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.io.hfile.ReaderContext;
@@ -30,8 +31,8 @@
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 {
+ final Configuration conf, final ReaderContext readerContext, final HFileInfo hFileInfo, Path p,
+ Reference r) throws IOException {
super(readerContext, hFileInfo, cacheConf, new AtomicInteger(0), conf);
}
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
index ad39db49b93..74089af3d01 100644
--- 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
@@ -21,6 +21,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.Reference;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.io.hfile.ReaderContext;
@@ -30,8 +31,8 @@
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 {
+ final Configuration conf, final ReaderContext readerContext, final HFileInfo hFileInfo, Path p,
+ Reference r) throws IOException {
super(readerContext, hFileInfo, cacheConf, new StoreFileInfo(conf, fs, p, true), conf);
}
diff --git a/phoenix-hbase-compat-2.6.4/pom.xml b/phoenix-hbase-compat-2.6.4/pom.xml
new file mode 100644
index 00000000000..a1944187ebf
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/pom.xml
@@ -0,0 +1,110 @@
+
+
+
+ 4.0.0
+
+ org.apache.phoenix
+ phoenix
+ 5.4.0-SNAPSHOT
+
+
+ phoenix-hbase-compat-2.6.4
+ Phoenix Hbase 2.6.4 compatibility
+ Compatibility module for HBase 2.6.4+
+
+
+ 2.6.4-hadoop3
+
+
+
+
+
+ org.apache.hbase
+ hbase-client
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-common
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-server
+ ${hbase26.compat.version}
+ provided
+
+
+
+ org.apache.hbase
+ hbase-hadoop-compat
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-hadoop2-compat
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-protocol
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-protocol-shaded
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-zookeeper
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-metrics
+ ${hbase26.compat.version}
+ provided
+
+
+ org.apache.hbase
+ hbase-metrics-api
+ ${hbase26.compat.version}
+ provided
+
+
+ org.slf4j
+ slf4j-api
+ provided
+
+
+
+ junit
+ junit
+ test
+
+
+
+
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/ByteStringer.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/ByteStringer.java
new file mode 100644
index 00000000000..e8c3f2fff89
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/ByteStringer.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 com.google.protobuf.ByteString;
+
+// This has different signature in the HBase 2 and 3 modules
+// This only comes together after the maven-replacer plugin relocates all protobuf code.
+public class ByteStringer {
+
+ private ByteStringer() {
+ }
+
+ public static ByteString wrap(final byte[] array) {
+ return org.apache.hadoop.hbase.util.ByteStringer.wrap(array);
+ }
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateFilter.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateFilter.java
new file mode 100644
index 00000000000..c1fb96f4f00
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateFilter.java
@@ -0,0 +1,37 @@
+/*
+ * 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.Cell;
+import org.apache.hadoop.hbase.filter.Filter;
+import org.apache.hadoop.hbase.filter.FilterBase;
+
+public class CompatDelegateFilter extends FilterBase {
+ protected Filter delegate = null;
+
+ public CompatDelegateFilter(Filter delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public ReturnCode filterKeyValue(Cell v) throws IOException {
+ return delegate.filterKeyValue(v);
+ }
+
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
new file mode 100644
index 00000000000..ed634aa0cd2
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatDelegateHTable.java
@@ -0,0 +1,141 @@
+/*
+ * 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.List;
+import org.apache.hadoop.hbase.CompareOperator;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.RowMutations;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
+
+public abstract class CompatDelegateHTable implements Table {
+
+ protected final Table delegate;
+
+ public CompatDelegateHTable(Table delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public HTableDescriptor getTableDescriptor() throws IOException {
+ return delegate.getTableDescriptor();
+ }
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareOp compareOp,
+ byte[] value, Put put) throws IOException {
+ return delegate.checkAndPut(row, family, qualifier, compareOp, value, put);
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareOp compareOp,
+ byte[] value, Delete delete) throws IOException {
+ return delegate.checkAndDelete(row, family, qualifier, compareOp, value, delete);
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOp compareOp,
+ byte[] value, RowMutations mutation) throws IOException {
+ return delegate.checkAndMutate(row, family, qualifier, compareOp, value, mutation);
+ }
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put)
+ throws IOException {
+ return delegate.checkAndPut(row, family, qualifier, value, put);
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value,
+ Delete delete) throws IOException {
+ return delegate.checkAndDelete(row, family, qualifier, value, delete);
+ }
+
+ @Override
+ public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareOperator op,
+ byte[] value, Put put) throws IOException {
+ return delegate.checkAndPut(row, family, qualifier, op, value, put);
+ }
+
+ @Override
+ public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareOperator op,
+ byte[] value, Delete delete) throws IOException {
+ return delegate.checkAndDelete(row, family, qualifier, op, value, delete);
+ }
+
+ @Override
+ public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator op,
+ byte[] value, RowMutations mutation) throws IOException {
+ return delegate.checkAndMutate(row, family, qualifier, op, value, mutation);
+ }
+
+ @Override
+ public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
+ return delegate.checkAndMutate(row, family);
+ }
+
+ @Override
+ public void setOperationTimeout(int operationTimeout) {
+ delegate.setOperationTimeout(operationTimeout);
+ }
+
+ @Override
+ public int getOperationTimeout() {
+ return delegate.getOperationTimeout();
+ }
+
+ @Override
+ public int getRpcTimeout() {
+ return delegate.getRpcTimeout();
+ }
+
+ @Override
+ public void setRpcTimeout(int rpcTimeout) {
+ delegate.setRpcTimeout(rpcTimeout);
+ }
+
+ @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);
+ }
+
+ @Override
+ public boolean[] existsAll(List gets) throws IOException {
+ return delegate.existsAll(gets);
+ }
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexHalfStoreFileReader.java
new file mode 100644
index 00000000000..293fafd146e
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.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 org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.Reference;
+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,
+ Reference r) throws IOException {
+ super(readerContext, hFileInfo, cacheConf, new StoreFileInfo(conf, fs, fs.getFileStatus(p), r),
+ conf);
+ }
+
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
new file mode 100644
index 00000000000..c23b0be5d87
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatIndexedHLogReader.java
@@ -0,0 +1,24 @@
+/*
+ * 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.4/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatLocalIndexStoreFileScanner.java
new file mode 100644
index 00000000000..62e328a54f9
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.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.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.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
new file mode 100644
index 00000000000..03d12c84ed1
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatOmidTransactionTable.java
@@ -0,0 +1,51 @@
+/*
+ * 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.client.Delete;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.RowMutations;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
+
+public abstract class CompatOmidTransactionTable implements Table {
+
+ @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.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPagingFilter.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPagingFilter.java
new file mode 100644
index 00000000000..84108750fc1
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPagingFilter.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 org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.filter.Filter;
+import org.apache.hadoop.hbase.filter.FilterBase;
+
+public abstract class CompatPagingFilter extends FilterBase {
+ protected Filter delegate = null;
+
+ public CompatPagingFilter(Filter delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public ReturnCode filterKeyValue(Cell v) throws IOException {
+
+ if (delegate != null) {
+ return delegate.filterKeyValue(v);
+ }
+ return super.filterKeyValue(v);
+ }
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
new file mode 100644
index 00000000000..a59843351f2
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatPhoenixRpcScheduler.java
@@ -0,0 +1,56 @@
+/*
+ * 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.ipc.CallRunner;
+import org.apache.hadoop.hbase.ipc.RpcScheduler;
+
+/**
+ * {@link RpcScheduler} that first checks to see if this is an index or metadata update before
+ * passing off the call to the delegate {@link RpcScheduler}.
+ */
+public abstract class CompatPhoenixRpcScheduler extends RpcScheduler {
+ protected RpcScheduler delegate;
+
+ @Override
+ public boolean dispatch(CallRunner task) {
+ try {
+ return compatDispatch(task);
+ } catch (Exception e) {
+ // This never happens with Hbase 2.5
+ throw new RuntimeException(e);
+ }
+ }
+
+ 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.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
new file mode 100644
index 00000000000..38a940aa43e
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/CompatUtil.java
@@ -0,0 +1,41 @@
+/*
+ * 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.List;
+import org.apache.hadoop.hbase.MetaTableAccessor;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CompatUtil {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(CompatUtil.class);
+
+ private CompatUtil() {
+ // Not to be instantiated
+ }
+
+ public static List getMergeRegions(Connection conn, RegionInfo regionInfo)
+ throws IOException {
+ return MetaTableAccessor.getMergeRegions(conn, regionInfo);
+ }
+
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.java
new file mode 100644
index 00000000000..ccd416a9143
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/HbaseCompatCapabilities.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;
+
+public class HbaseCompatCapabilities {
+ // Currently every supported HBase version has the same capabilities, so there is
+ // nothing in here.
+}
diff --git a/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/package-info.java b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/package-info.java
new file mode 100644
index 00000000000..7c098f49719
--- /dev/null
+++ b/phoenix-hbase-compat-2.6.4/src/main/java/org/apache/phoenix/compat/hbase/package-info.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.
+ */
+
+/**
+ * This package contains compatibility classes for bridging differences
+ * between different versions of HBase.
+ */
+package org.apache.phoenix.compat.hbase;
diff --git a/pom.xml b/pom.xml
index 293a1e53ea2..bb8c26da5bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,7 @@
+ phoenix-hbase-compat-2.6.4
phoenix-hbase-compat-2.6.0
phoenix-hbase-compat-2.5.4
phoenix-hbase-compat-2.5.0
@@ -78,7 +79,8 @@
2.5.10-hadoop3
2.5.12-hadoop3
2.6.1-hadoop3
- 2.6.3-hadoop3
+ 2.6.3-hadoop3
+ 2.6.4-hadoop3
1.8
${compileSource}
@@ -268,6 +270,11 @@
phoenix-client-embedded-hbase-2.6.0
${project.version}
+
+ org.apache.phoenix
+ phoenix-client-embedded-hbase-2.6.3
+ ${project.version}
+
org.apache.phoenix
phoenix-client-lite-hbase-2.5.4
@@ -288,6 +295,11 @@
phoenix-client-lite-hbase-2.6.0
${project.version}
+
+ org.apache.phoenix
+ phoenix-client-lite-hbase-2.6.3
+ ${project.version}
+
org.apache.phoenix
phoenix-client-lite-hbase-2.6
@@ -313,6 +325,11 @@
phoenix-server-hbase-2.6.0
${project.version}
+
+ org.apache.phoenix
+ phoenix-server-hbase-2.6.3
+ ${project.version}
+
org.apache.phoenix
phoenix-server-hbase-2.6
@@ -343,6 +360,11 @@
phoenix-mapreduce-byo-shaded-hbase-hbase-2.6
${project.version}
+
+ org.apache.phoenix
+ phoenix-mapreduce-byo-shaded-hbase-hbase-2.6.3
+ ${project.version}
+
org.apache.phoenix
phoenix-pherf
@@ -373,6 +395,11 @@
phoenix-hbase-compat-2.6.0
${project.version}
+
+ org.apache.phoenix
+ phoenix-hbase-compat-2.6.4
+ ${project.version}
+
org.apache.phoenix
@@ -2179,7 +2206,7 @@
- phoenix-hbase-compat-2.6.2
+ phoenix-hbase-compat-2.6.4
hbase.profile
@@ -2188,11 +2215,25 @@
2.6
-
- 2.6.0
+ 2.6.4
${hbase-2.6.runtime.version}
+
+
+ phoenix-hbase-compat-2.6.3
+
+
+ hbase.profile
+ 2.6.3
+
+
+
+ 2.6.3
+ 2.6.0
+ ${hbase-2.6.3.runtime.version}
+
+
phoenix-hbase-compat-2.6.0