Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions phoenix-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@
<artifactId>phoenix-hbase-compat-2.6.0</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-hbase-compat-2.6.4</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
3 changes: 3 additions & 0 deletions phoenix-core-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@
|| ("${hbase.compat.version}".equals("2.6.0")
&amp;&amp; hbaseMinor == 6
&amp;&amp; hbasePatch &gt;=0)
|| ("${hbase.compat.version}".equals("2.6.4")
&amp;&amp; hbaseMinor == 6
&amp;&amp; hbasePatch &gt;=4)
)</condition>
</evaluateBeanshell>
</rules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down
110 changes: 110 additions & 0 deletions phoenix-hbase-compat-2.6.4/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?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</version>
</parent>

<artifactId>phoenix-hbase-compat-2.6.4</artifactId>
<name>Phoenix Hbase 2.6.4 compatibility</name>
<description>Compatibility module for HBase 2.6.4+</description>

<properties>
<hbase26.compat.version>2.6.4-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>
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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);
}

}
Loading