Skip to content

Commit 34f6de3

Browse files
authored
Update HBASE to 2.3.7 in PXF (#51)
### hbase-client update Update `hbase-client` from `1.3.2` to `2.3.7` (latest version with minimal 3rd-party library updates) with following decision made: * Use hadoop 2 version - Despite of the fact that we are using hadoop 3 in automation tests, we still using hadoop2 libs for all other connectors. * Use shaded version of libraries when it relocates java-packages to new namespaces * Use non-shaded version of libraries when it just bundles several jars to single fat-jar. Fat jars hides dependencies from gradle, however puts classes on classpath. This will lead to unpredictable issues. Fortunately, `hbase-client:2.3.7` depends on `hadoop-2.10.0` that we are using! No changes here. ### update details ``` runtimeClasspath - Runtime classpath of source set 'main'. \--- org.apache.hbase:hbase-client:2.3.7 +--- org.apache.hbase.thirdparty:hbase-shaded-protobuf:3.3.0 +--- org.apache.hbase:hbase-common:2.3.7 | +--- org.apache.hbase:hbase-logging:2.3.7 | +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 | | \--- com.google.errorprone:error_prone_annotations:2.3.4 | +--- org.apache.hbase.thirdparty:hbase-shaded-gson:3.3.0 | +--- org.apache.hbase.thirdparty:hbase-shaded-netty:3.3.0 | +--- commons-codec:commons-codec:1.13 | +--- org.apache.commons:commons-lang3:3.9 | +--- commons-io:commons-io:2.11.0 | +--- com.google.protobuf:protobuf-java:2.5.0 | +--- org.apache.htrace:htrace-core4:4.2.0-incubating | +--- org.apache.commons:commons-crypto:1.0.0 | +--- org.apache.yetus:audience-annotations:0.5.0 | \--- org.apache.hadoop:hadoop-common:2.10.0 -> 2.10.2 +--- org.apache.hbase:hbase-hadoop-compat:2.3.7 | +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 (*) | +--- org.apache.hbase:hbase-metrics-api:2.3.7 | | +--- org.apache.hbase:hbase-common:2.3.7 (*) | | +--- org.apache.commons:commons-lang3:3.9 | | +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 (*) +--- org.apache.hbase:hbase-hadoop2-compat:2.3.7 | +--- org.apache.hbase:hbase-hadoop-compat:2.3.7 (*) | +--- org.apache.hbase:hbase-common:2.3.7 (*) | +--- org.apache.hbase:hbase-metrics:2.3.7 | | +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 (*) | | +--- org.apache.hbase:hbase-common:2.3.7 (*) | | +--- org.apache.hbase:hbase-metrics-api:2.3.7 (*) | | +--- io.dropwizard.metrics:metrics-core:3.2.6 | +--- org.apache.hbase:hbase-metrics-api:2.3.7 (*) | +--- org.apache.hadoop:hadoop-common:2.10.0 -> 2.10.2 (*) | +--- javax.activation:javax.activation-api:1.2.0 | +--- org.apache.commons:commons-lang3:3.9 | +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 (*) +--- org.apache.hbase:hbase-protocol-shaded:2.3.7 | +--- org.apache.hbase.thirdparty:hbase-shaded-protobuf:3.3.0 +--- org.apache.hbase:hbase-protocol:2.3.7 | +--- com.google.protobuf:protobuf-java:2.5.0 +--- commons-codec:commons-codec:1.13 +--- commons-io:commons-io:2.11.0 +--- org.apache.commons:commons-lang3:3.9 +--- org.slf4j:slf4j-api:1.7.30 -> 1.7.36 +--- org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:3.3.0 (*) +--- com.google.protobuf:protobuf-java:2.5.0 +--- org.apache.hbase.thirdparty:hbase-shaded-netty:3.3.0 +--- org.apache.zookeeper:zookeeper:3.5.7 (*) +--- org.apache.htrace:htrace-core4:4.2.0-incubating +--- org.jruby.jcodings:jcodings:1.0.18 +--- org.jruby.joni:joni:2.1.11 | \--- org.jruby.jcodings:jcodings:1.0.13 -> 1.0.18 +--- io.dropwizard.metrics:metrics-core:3.2.6 (*) +--- org.apache.commons:commons-crypto:1.0.0 +--- org.apache.yetus:audience-annotations:0.5.0 +--- org.apache.hadoop:hadoop-auth:2.10.0 -> 2.10.2 (*) \--- org.apache.hadoop:hadoop-common:2.10.0 -> 2.10.2 (*) (*) - dependencies omitted (listed previously) ``` ### Other changes * Automation tests: upgrade hbase to 2.3.7
1 parent 0697e85 commit 34f6de3

9 files changed

Lines changed: 72 additions & 31 deletions

File tree

automation/docker/singlecluster/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ RUN apt-get update && \
1010
ENV HADOOP_VERSION=3.1.2
1111
ENV HIVE_VERSION=3.1.3
1212
ENV ZOOKEEPER_VERSION=3.5.9
13-
ENV HBASE_VERSION=2.0.6
13+
ENV HBASE_VERSION=2.3.7
1414
ENV TEZ_VERSION=0.9.2
1515

1616
# checksums from archive.apache.org
1717
ENV HADOOP_SHA512="0e0ee817c89b3c4eb761eca7f16640742a83b0e99b6fda26c1bee2baabedad93aab86e252bf5f1e2381c6d464bc4003d10c7cc0f61b2062f4c59732ca24d1bd9"
1818
ENV HIVE_SHA256="0c9b6a6359a7341b6029cc9347435ee7b379f93846f779d710b13f795b54bb16"
1919
ENV ZOOKEEPER_SHA512="0e5a64713abc6f36d961dd61a06f681868171a9d9228366e512a01324806d263e05508029c94d8e18307811867cdc39d848e736c252bf56c461273ef74c66a45"
20-
ENV HBASE_SHA512="a0e10904ecf7f059b77bc0ce704254046a978126db720cc7e55dc53b87097715da64b8391fe3cc94348bc432871ad8f29891dc8df1ea052eb628da0fdca97c93"
20+
ENV HBASE_SHA512="1032521025660daa70260cdc931f52a26c87596be444451fe1fa88b526ede55e9d6b4220e91ff6f7422bec11f30d64fa6745e95a9c36971fdb1a264a2c745693"
2121
ENV TEZ_SHA512="a2d94bd9fa778d42a8bac9d9da8e263e469ddfef93968b06434716554995f490231de5607541ac236e770aa0158b64250c38bc1cd57dbfa629fea705f2ffa2f5"
2222

2323
# faster mirror:
@@ -59,7 +59,7 @@ RUN mkdir -p $ZOOKEEPER_ROOT && \
5959
RUN mkdir -p $HBASE_ROOT && \
6060
curl -fSL "$HBASE_URL" -o hbase.tar.gz && \
6161
echo "$HBASE_SHA512 hbase.tar.gz" | sha512sum -c && \
62-
tar xvf hbase.tar.gz -C $HBASE_ROOT --strip-components 1 --exclude="docs/*" && \
62+
tar xvf hbase.tar.gz -C $HBASE_ROOT --strip-components 1 --exclude="docs/*" --exclude="lib/*-tests.jar" --exclude="lib/shaded-clients" && \
6363
rm hbase.tar.gz
6464

6565
RUN mkdir -p $TEZ_ROOT && \

automation/docker/singlecluster/README.HDP3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It contains the following versions:
77
- Hadoop 3.3.6
88
- Hive 3.1.3
99
- Zookeeper 3.5.9
10-
- HBase 2.0.6
10+
- HBase 2.3.7
1111
- Tez 0.9.2
1212

1313
This version of Single cluster requires users to make some manual changes to the configuration files once the tarball has been unpacked (see Initialization steps below).

server/build.gradle

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,17 @@ configure(javaProjects) {
9090
dependency("commons-configuration:commons-configuration:1.10")
9191
dependency("commons-io:commons-io:2.7")
9292
dependency("commons-lang:commons-lang:2.6")
93+
dependency("commons-lang:commons-lang3:3.9")
9394
dependency("commons-logging:commons-logging:1.1.3")
9495
dependency("io.airlift:aircompressor:0.27")
9596
dependency("javax.jdo:jdo-api:3.0.1")
9697
dependency("joda-time:joda-time:2.8.1")
9798
dependency("net.sf.opencsv:opencsv:2.3")
9899
dependency("org.antlr:antlr-runtime:3.5.2")
99100
dependency("org.apache.commons:commons-compress:1.20")
101+
dependency("org.apache.commons:commons-crypto:1.0.0")
100102
dependency("org.apache.htrace:htrace-core:3.1.0-incubating")
101-
dependency("org.apache.htrace:htrace-core4:4.0.1-incubating")
103+
dependency("org.apache.htrace:htrace-core4:4.2.0-incubating")
102104

103105
dependency("org.apache.zookeeper:zookeeper:3.4.6")
104106
dependency("org.codehaus.woodstox:stax2-api:3.1.4")
@@ -135,11 +137,28 @@ configure(javaProjects) {
135137

136138
// HBase dependencies
137139
dependencySet(group:"org.apache.hbase", version:"${hbaseVersion}") {
138-
entry("hbase-annotations")
139140
entry("hbase-client")
140141
entry("hbase-common")
141142
entry("hbase-protocol")
143+
entry("hbase-protocol-shaded")
144+
entry("hbase-logging")
145+
entry("hbase-hadoop-compat")
146+
entry("hbase-hadoop2-compat")
147+
entry("hbase-metrics-api")
148+
entry("hbase-metrics")
142149
}
150+
dependencySet(group:"org.apache.hbase.thirdparty", version:"3.3.0") {
151+
entry("hbase-shaded-protobuf")
152+
entry("hbase-shaded-miscellaneous")
153+
entry("hbase-shaded-gson")
154+
entry("hbase-shaded-netty")
155+
entry("hbase-unsafe")
156+
}
157+
dependency("org.apache.yetus:audience-annotations:0.5.0")
158+
dependency("io.opentelemetry:opentelemetry-api:1.49.0")
159+
dependency("io.opentelemetry:opentelemetry-context:1.49.0")
160+
dependency("io.opentelemetry.semconv:opentelemetry-semconv:1.29.0-alpha")
161+
dependency("io.dropwizard.metrics:metrics-core:3.2.6")
143162

144163
// Hive dependencies
145164
dependency("org.apache.hive:hive-storage-api:${hiveStorageApiVersion}")
@@ -230,15 +249,15 @@ configure(javaProjects) {
230249
options.compilerArgs += [
231250
"-g", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann", "-Xlint:divzero",
232251
"-Xlint:empty", "-Xlint:finally", "-Xlint:overrides", "-Xlint:path", "-Xlint:-processing", "-Xlint:static",
233-
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:deprecation", "-Xlint:unchecked", "-Xlint:-options", "-Werror"
252+
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:unchecked", "-Xlint:-options", "-Werror"
234253
]
235254
}
236255

237256
compileTestJava {
238257
options.compilerArgs += [
239258
"-g", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann", "-Xlint:divzero",
240259
"-Xlint:empty", "-Xlint:finally", "-Xlint:overrides", "-Xlint:path", "-Xlint:-processing", "-Xlint:static",
241-
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:deprecation", "-Xlint:unchecked", "-Xlint:-options", "-Werror"
260+
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:unchecked", "-Xlint:-options", "-Werror"
242261
]
243262
}
244263

server/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ license=ASL 2.0
2121
hadoopVersion=2.10.2
2222
hiveVersion=2.3.8
2323
hiveStorageApiVersion=2.7.3
24-
hbaseVersion=1.3.2
24+
hbaseVersion=2.3.7
2525
junitVersion=4.11
2626
parquetVersion=1.11.1
2727
awsJavaSdk=1.12.261

server/pxf-hbase/build.gradle

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,47 @@ dependencies {
1414
*******************************/
1515

1616
compileOnly("com.google.code.findbugs:annotations")
17-
compileOnly("org.apache.hbase:hbase-annotations")
1817

1918
/*******************************
20-
* Implementation Dependencies
19+
* Project Dependencies
2120
*******************************/
2221

2322
implementation(project(':pxf-api'))
24-
implementation("com.google.protobuf:protobuf-java")
2523
implementation("commons-collections:commons-collections")
26-
implementation("org.apache.hbase:hbase-client") { transitive = false }
27-
implementation("org.apache.hbase:hbase-common") { transitive = false }
28-
implementation("org.apache.hbase:hbase-protocol") { transitive = false }
29-
implementation("org.apache.htrace:htrace-core") { transitive = false }
30-
implementation("org.apache.zookeeper:zookeeper") { transitive = false }
31-
implementation("io.netty:netty-common") { transitive = false }
32-
implementation("io.netty:netty-transport") { transitive = false }
33-
implementation("com.yammer.metrics:metrics-core") { transitive = false }
24+
25+
/*******************************
26+
* Hbase
27+
*******************************/
28+
29+
implementation("org.apache.hbase:hbase-client") { transitive = false }
30+
implementation("org.apache.hbase.thirdparty:hbase-shaded-protobuf") { transitive = false }
31+
implementation("org.apache.hbase:hbase-common") { transitive = false }
32+
implementation("org.apache.hbase:hbase-logging") { transitive = false }
33+
implementation("org.apache.hbase.thirdparty:hbase-shaded-miscellaneous") { transitive = false }
34+
implementation("org.apache.hbase.thirdparty:hbase-shaded-gson") { transitive = false }
35+
implementation("org.apache.hbase.thirdparty:hbase-shaded-netty") { transitive = false }
36+
implementation("org.apache.commons:commons-lang3") { transitive = false }
37+
implementation("org.apache.commons:commons-crypto") { transitive = false }
38+
implementation("org.apache.hadoop:hadoop-common") { transitive = false }
39+
implementation("org.apache.hadoop:hadoop-auth") { transitive = false }
40+
implementation("org.apache.hbase:hbase-hadoop-compat") { transitive = false }
41+
implementation("org.apache.hbase:hbase-metrics-api") { transitive = false }
42+
implementation("org.apache.hbase:hbase-metrics") { transitive = false }
43+
implementation("org.apache.hbase:hbase-hadoop2-compat") { transitive = false }
44+
implementation("org.apache.hbase:hbase-protocol-shaded") { transitive = false }
45+
implementation("org.apache.hbase:hbase-protocol") { transitive = false }
46+
implementation("com.google.protobuf:protobuf-java") { transitive = false }
47+
implementation("org.apache.zookeeper:zookeeper") { transitive = false }
48+
implementation("io.netty:netty-common") { transitive = false }
49+
implementation("io.netty:netty-transport") { transitive = false }
50+
// skip JRuby - it is part of interactive shell
51+
// implementation("org.jruby.jcodings:jcodings:1.0.58") { transitive = false }
52+
// implementation("org.jruby.joni:joni:2.2.1") { transitive = false }
53+
implementation("org.apache.yetus:audience-annotations") { transitive = false }
54+
implementation("io.opentelemetry:opentelemetry-api") { transitive = false }
55+
implementation("io.opentelemetry:opentelemetry-context") { transitive = false }
56+
implementation("io.opentelemetry.semconv:opentelemetry-semconv") { transitive = false }
57+
implementation("io.dropwizard.metrics:metrics-core:3.2.6") { transitive = false }
3458

3559
implementation("org.springframework.boot:spring-boot-starter-log4j2")
3660

@@ -39,7 +63,6 @@ dependencies {
3963
*******************************/
4064

4165
testCompileOnly("com.google.code.findbugs:annotations")
42-
testCompileOnly("org.apache.hbase:hbase-annotations")
4366
testImplementation("com.esotericsoftware:minlog")
4467
testImplementation("com.esotericsoftware:reflectasm")
4568
testImplementation('org.springframework.boot:spring-boot-starter-test')

server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HBaseDataFragmenter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public FragmentStats getFragmentStats() {
8181
public List<Fragment> getFragments() throws Exception {
8282

8383
// check that Zookeeper and HBase master are available
84-
HBaseAdmin.checkHBaseAvailable(configuration);
8584
connection = ConnectionFactory.createConnection(configuration);
8685
Admin hbaseAdmin = connection.getAdmin();
8786
if (!HBaseUtilities.isTableAvailable(hbaseAdmin, context.getDataSource())) {

server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/utilities/HBaseDoubleComparator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
* under the License.
2020
*/
2121

22-
import com.google.protobuf.ByteString;
23-
import com.google.protobuf.InvalidProtocolBufferException;
22+
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;
23+
import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;
2424
import org.apache.hadoop.hbase.exceptions.DeserializationException;
2525
import org.apache.hadoop.hbase.filter.ByteArrayComparable;
26-
import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos;
26+
import org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos;
2727
import org.apache.hadoop.hbase.util.Bytes;
2828

2929
public class HBaseDoubleComparator extends ByteArrayComparable {

server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/utilities/HBaseFloatComparator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
* under the License.
2020
*/
2121

22-
import com.google.protobuf.ByteString;
23-
import com.google.protobuf.InvalidProtocolBufferException;
22+
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;
23+
import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;
2424
import org.apache.hadoop.hbase.exceptions.DeserializationException;
2525
import org.apache.hadoop.hbase.filter.ByteArrayComparable;
26-
import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos;
26+
import org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos;
2727
import org.apache.hadoop.hbase.util.Bytes;
2828

2929
public class HBaseFloatComparator extends ByteArrayComparable{

server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/utilities/HBaseIntegerComparator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
import org.apache.hadoop.hbase.exceptions.DeserializationException;
2424
import org.apache.hadoop.hbase.filter.ByteArrayComparable;
2525
import org.apache.hadoop.hbase.filter.SubstringComparator;
26-
import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos;
26+
import org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos;
2727
import org.apache.hadoop.hbase.util.Bytes;
2828

29-
import com.google.protobuf.ByteString;
30-
import com.google.protobuf.InvalidProtocolBufferException;
29+
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;
30+
import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException;
3131

3232
/**
3333
* This is a Filter comparator for HBase It is external to PXF HBase code.

0 commit comments

Comments
 (0)