Skip to content

Commit 7e52957

Browse files
authored
Merge pull request #9 from busbey/update-hbase-versions
Update hbase versions
2 parents 836148a + 556a9d3 commit 7e52957

12 files changed

Lines changed: 30 additions & 416 deletions

File tree

README.md

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ your ZooKeeper quorum (defaults to localhost).
1515

1616
For example, to use the HBase 1.y API to test against an HBase 1.y cluster:
1717

18-
$ scp hbase-1/target/hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1.jar edge-node.example.com:
19-
hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1.jar 100% 11KB 10.8KB/s 00:00
18+
$ scp hbase-1/target/hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1.jar edge-node.example.com:
19+
hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1.jar 100% 11KB 10.8KB/s 00:00
2020
$ ssh edge-node.example.com
21-
$ HBASE_CLASSPATH=hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1.jar hbase org.hbase.downstreamer.GetMetaContent zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181
21+
$ HBASE_CLASSPATH=hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1.jar hbase org.hbase.downstreamer.GetMetaContent zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181
2222
...SNIP...
2323
$ echo $?
2424
0
@@ -33,74 +33,52 @@ To build against a version of HBase 1.y other than the latest stable, specify `h
3333
property on the maven command line. Similarly, you can use `hadoop.version` to specify a different
3434
release of Hadoop 2.
3535

36-
For example, below we'll build our HBase 1.y API example against HBase 1.1.12 and Hadoop 2.7.0
37-
(an unstable release of Hadoop currently available for developer testing).
36+
For example, below we'll build our HBase 1.y API example against HBase 1.3.4 and Hadoop 2.9.2.
3837

39-
$ mvn -Dhbase.1.version=1.1.12 -Dhadoop.version=2.7.0 -pl hbase-1 -am clean package
40-
41-
If you want to build against a specific HBase 0.98 version, you can specify `hbase.98.version` property
42-
on the maven command line. Just like the HBase 1.y module, `hadoop.version` can specify a different
43-
Hadoop 2 release.
44-
45-
$ mvn -Dhbase.98.version=0.98.12 -Dhadoop.version=2.7.0 -pl hbase-0.98 -am clean package
46-
47-
If you want to use HBase 0.98 with Hadoop 1, you'll need to use the `hadoop-1` profile when building
48-
the `hbase-0.98` module. Specifying an HBase 0.98 or Hadoop 1 version other than the latest works
49-
similarly to the defaults that build against Hadoop 2. Note that the `hadoop-1` profile only alters
50-
the building of the HBase 0.98 API module; use of Hadoop 1 was dropped in HBase 1.0+.
51-
52-
$ mvn -Phadoop-1 -pl hbase-0.98 -am clean package
38+
$ mvn -Dhbase.1.version=1.3.4 -Dhadoop.version=2.9.2 -pl hbase-1 -am clean package
5339

5440
To test building against a repository, e.g. the staging repo for an HBase release candidate, you can
5541
set use the hbase.staging.repository property. Note that you'll also have to specify the appropriate
5642
upstream release version. (for good measure clear your local cache of jars under .m2/repository or
5743
pass -U to maven building):
5844

59-
$ mvn -Dhbase.1.version=1.1.1 \
60-
-Dhbase.staging.repository='https://repository.apache.org/content/repositories/orgapachehbase-1001' \
45+
$ mvn -Dhbase.1.version=1.4.11 \
46+
-Dhbase.staging.repository='https://repository.apache.org/content/repositories/orgapachehbase-1234' \
6147
clean package
6248

6349
testing source compatibility
6450
===========================
6551

66-
Each of the major version specific modules should be relying on the supported APIs for that particular major release. As such, we expect them to work with the following major release. For example, the `hbase-0.98` module should build and run fine when given HBase 1.y release artifacts. Similarly, the `hbase-1` module should still build fine if we try to compile it against HBase 2.y releases.
52+
Each of the major version specific modules should be relying on the supported APIs for that particular major release. As such, we expect them to work with the following major release. For example, the `hbase-1` module should still build fine if we try to compile it against HBase 2.y releases.
6753

68-
You can test the above assertions by passing in a suitable next-major-release version number for the api-specific parameters. E.g. to use the 0.98 API with upstream HBase 1.1.12 you would do:
54+
You can test the above assertions by passing in a suitable next-major-release version number for the api-specific parameters. E.g. to use the 1.x API with upstream HBase 2.1.5 you would do:
6955

70-
$ mvn -Dhbase.98.version=1.1.12 -pl hbase-0.98 -am clean package
56+
$ mvn -Dhbase.version=2.1.5 -pl hbase-1 -am clean package
7157

7258
To make this easier, there are profiles that will pick an appropraite next-major-version for you.
7359

74-
Ensure HBase 0.98 API use works with HBase 1:
75-
76-
$ mvn -Pbuild-0.98-against-hbase-1 -pl hbase-0.98 -am clean package
77-
7860
Ensure HBase 1 API use works with HBase 2:
7961

8062
$ mvn -Pbuild-1.y-against-hbase-2 -pl hbase-1 -am clean package
8163

82-
As with most of the settings in this guide, you can combine these to test multiple modules at once:
83-
84-
$ mvn -Pbuild-0.98-against-hbase-1 -Pbuild-1.y-against-hbase-2 clean package
85-
86-
You should not expect the reverse to work. That is, building the HBase 1.y API with an HBase 0.98 version will fail. Similarly, you should not expect using a version that is more than one major version ahead to work.
64+
You should not expect the reverse to work. That is, building the HBase 2.y API module with an HBase 1.x version will fail. Similarly, you should not expect using a version that is more than one major version ahead to work.
8765

8866
testing client-server compatibility with a standalone client
8967
============================================================
9068

9169
If you wish to verify client-server wire compatibility between HBase & Hadoop versions you can
9270
build a standalone jar using the 'client-standalone' profile. This profile can be combined with any of the
93-
above options for choosing an HBase and Hadoop version. (You must always specify a version for the HBase 0.98 module)
71+
above options for choosing an HBase and Hadoop version.
9472

9573
$ mvn -Pclient-standalone -Phadoop-2 clean package
9674

9775
The generated artifact should be used on a live cluster with the java command. It should only need
9876
access to HBase client configuration files and the location of your zookeeper quorum.
9977

100-
$ scp hbase-1/target/hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1-standalone.jar edge-node.example.com:
101-
hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1-standalone.jar 100% 31MB 378.3KB/s 01:24
78+
$ scp hbase-1/target/hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1-standalone.jar edge-node.example.com:
79+
hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1-standalone.jar 100% 31MB 378.3KB/s 01:24
10280
$ ssh edge-node.example.com
103-
$ java -cp /etc/hbase/conf:hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1-standalone.jar org.hbase.downstreamer.GetMetaContent zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181
81+
$ java -cp /etc/hbase/conf:hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1-standalone.jar org.hbase.downstreamer.GetMetaContent zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181
10482
...SNIP...
10583
$ echo $?
10684
0
@@ -139,11 +117,11 @@ Create needed test table in hbase and grant access to 'auser' (presumes hbase us
139117

140118
Test run with writes to hbase on the cluster (no need to kinit, presuming default hbase, hadoop, and slf4j versions):
141119

142-
$ spark-submit --master yarn --deploy-mode cluster --keytab auser.keytab --principal 'auser@EXAMPLE.COM' --class org.hbase.downstreamer.spark.JavaNetworkWordCountStoreInHBase --packages org.slf4j:slf4j-api:1.7.5 hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1.jar netcat.running.host.example.com 1772 2>spark.log | tee spark.out
120+
$ spark-submit --master yarn --deploy-mode cluster --keytab auser.keytab --principal 'auser@EXAMPLE.COM' --class org.hbase.downstreamer.spark.JavaNetworkWordCountStoreInHBase --packages org.slf4j:slf4j-api:1.7.5 hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1.jar netcat.running.host.example.com 1772 2>spark.log | tee spark.out
143121

144122
Alternative, you can use the standalone client jar. In addition to relying on the HBase client jars you package, this will let you skip including the slf4j-api jars:
145123

146-
$ spark-submit --master yarn --deploy-mode cluster --keytab auser.keytab --principal 'auser@EXAMPLE.COM' --class org.hbase.downstreamer.spark.JavaNetworkWordCountStoreInHBase hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.2.6_2.6.1-standalone.jar netcat.running.host.example.com 1772 2>spark.log | tee spark.out
124+
$ spark-submit --master yarn --deploy-mode cluster --keytab auser.keytab --principal 'auser@EXAMPLE.COM' --class org.hbase.downstreamer.spark.JavaNetworkWordCountStoreInHBase hbase-downstreamer-api-1.y-2.0-SNAPSHOT-1.4.10_2.7.1-standalone.jar netcat.running.host.example.com 1772 2>spark.log | tee spark.out
147125

148126
Verify results in hbase (presumes you have stored kerberos tickets)
149127

hbase-0.98/pom.xml

Lines changed: 0 additions & 170 deletions
This file was deleted.

hbase-0.98/src/main/assemblies/standalone.xml

Lines changed: 0 additions & 41 deletions
This file was deleted.

hbase-0.98/src/main/java/org/hbase/downstreamer/GetMetaContent.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)