Skip to content

Commit 8bc58ec

Browse files
committed
Merge branch 'next'
2 parents 3129a89 + 83b0d49 commit 8bc58ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+16041
-440
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
22
pom.xml
33
target/
4+
/bin/

.travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: java
2+
before_install:
3+
- wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz -O /tmp/protobuf-2.5.0.tar.gz
4+
- tar -C /tmp -xvf /tmp/protobuf-2.5.0.tar.gz
5+
- cd /tmp/protobuf-2.5.0 && ./configure --prefix=/usr && make --quiet && sudo make install
6+
before_script:
7+
- cd ~/build/*/asynchbase
8+
- make pom.xml
9+
script: export MAVEN_OPTS="-Xmx1024m" && mvn test --quiet
10+
jdk:
11+
- oraclejdk7
12+
- openjdk6
13+
notifications:
14+
email: false

Makefile

+44-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ proto_builddir := $(top_builddir)/protobuf
3939
spec_title := Asynchronous HBase Client
4040
spec_vendor := The Async HBase Authors
4141
# Semantic Versioning (see http://semver.org/).
42-
spec_version := 1.6.0
42+
spec_version := 1.7.0
4343
jar := $(top_builddir)/asynchbase-$(spec_version).jar
4444

4545
asynchbase_PROTOS := \
@@ -59,6 +59,7 @@ PROTOBUF_GEN_DIR = $(top_builddir)/src/org/hbase/async/generated
5959
BUILT_SOURCES := $(asynchbase_PROTOS:protobuf/%.proto=$(PROTOBUF_GEN_DIR)/%PB.java)
6060

6161
asynchbase_SOURCES := \
62+
src/AppendRequest.java \
6263
src/AtomicIncrementRequest.java \
6364
src/BatchableRpc.java \
6465
src/BinaryComparator.java \
@@ -68,23 +69,28 @@ asynchbase_SOURCES := \
6869
src/BufferedIncrement.java \
6970
src/Bytes.java \
7071
src/ClientStats.java \
72+
src/ColumnPaginationFilter.java \
7173
src/ColumnPrefixFilter.java \
7274
src/ColumnRangeFilter.java \
7375
src/CompareAndSetRequest.java \
7476
src/CompareFilter.java \
77+
src/Config.java \
7578
src/ConnectionResetException.java \
7679
src/Counter.java \
7780
src/DeleteRequest.java \
7881
src/DependentColumnFilter.java \
7982
src/FamilyFilter.java \
8083
src/FilterComparator.java \
8184
src/FilterList.java \
85+
src/FirstKeyOnlyFilter.java \
86+
src/FuzzyRowFilter.java \
8287
src/GetRequest.java \
8388
src/HBaseClient.java \
8489
src/HBaseException.java \
8590
src/HBaseRpc.java \
8691
src/HasFailedRpcException.java \
8792
src/InvalidResponseException.java \
93+
src/KeyOnlyFilter.java \
8894
src/KeyRegexpFilter.java \
8995
src/KeyValue.java \
9096
src/MultiAction.java \
@@ -97,15 +103,22 @@ asynchbase_SOURCES := \
97103
src/RecoverableException.java \
98104
src/RegexStringComparator.java \
99105
src/RegionClient.java \
106+
src/RegionClientStats.java \
100107
src/RegionInfo.java \
108+
src/RegionLocation.java \
101109
src/RegionOfflineException.java \
102110
src/RegionMovedException.java \
111+
src/RegionOpeningException.java \
103112
src/RemoteException.java \
113+
src/RpcTimedOutException.java \
104114
src/RowFilter.java \
105115
src/RowLock.java \
106116
src/RowLockRequest.java \
107117
src/ScanFilter.java \
108118
src/Scanner.java \
119+
src/SecureRpcHelper.java \
120+
src/SecureRpcHelper94.java \
121+
src/SecureRpcHelper96.java \
109122
src/SingletonList.java \
110123
src/SubstringComparator.java \
111124
src/TableNotFoundException.java \
@@ -114,8 +127,12 @@ asynchbase_SOURCES := \
114127
src/UnknownScannerException.java \
115128
src/ValueFilter.java \
116129
src/VersionMismatchException.java \
130+
src/auth/ClientAuthProvider.java \
131+
src/auth/KerberosClientAuthProvider.java \
132+
src/auth/Login.java \
133+
src/auth/SimpleClientAuthProvider.java \
117134
src/jsr166e/LongAdder.java \
118-
src/jsr166e/Striped64.java \
135+
src/jsr166e/Striped64.java
119136

120137
protobuf_SOURCES := src/protobuf/ZeroCopyLiteralByteString.java
121138

@@ -134,8 +151,31 @@ test_SOURCES := \
134151
test/TestIntegration.java \
135152

136153
unittest_SRC := \
154+
test/BaseTestHBaseClient.java \
155+
test/BaseTestRegionClient.java \
156+
test/BaseTestSecureRpcHelper.java \
157+
test/PBufResponses.java \
158+
test/TestConfig.java \
159+
test/TestDeleteRequest.java \
160+
test/TestGetRequest.java \
161+
test/TestHBaseClient.java \
162+
test/TestHBaseClientLocateRegion.java \
163+
test/TestHBaseRpc.java \
137164
test/TestMETALookup.java \
138-
test/TestNSREs.java
165+
test/TestMultiAction.java \
166+
test/TestNSREs.java \
167+
test/TestPutRequest.java \
168+
test/TestRegionClient.java \
169+
test/TestRegionClientDecode.java \
170+
test/TestRegionClientSendRpc.java \
171+
test/TestSecureRpcHelper.java \
172+
test/TestSecureRpcHelper96.java \
173+
test/TestSecureRpcHelper94.java \
174+
test/TestZKClient.java \
175+
test/auth/MockProvider.java \
176+
test/auth/TestKerberosClientAuthProvider.java \
177+
test/auth/TestLogin.java \
178+
test/auth/TestSimpleClientAuthProvider.java
139179

140180
test_LIBADD := \
141181
$(asynchbase_LIBADD) \
@@ -197,7 +237,7 @@ test_classes_with_nested_classes := $(test_classes:$(top_builddir)/%.class=%*.cl
197237

198238
run: jar $(test_classes)
199239
@test -n "$(CLASS)" || { echo 'usage: $(MAKE) run CLASS=<name>'; exit 1; }
200-
$(JAVA) -ea -esa $(JVM_ARGS) -cp "$(get_runtime_dep_classpath):$(top_builddir)" $(package).test.$(CLASS) $(ARGS)
240+
$(JAVA) -ea -esa $(JVM_ARGS) -cp "$(get_runtime_dep_classpath):$(top_builddir)" $(package).$(CLASS) $(ARGS)
201241

202242
cli:
203243
$(MAKE) run CLASS=Test

NEWS

+40-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
AsyncHBase - User visible and noteworthy changes.
22
This project uses Semantic Versioning (see http://semver.org/).
33

4+
* Version 1.7.0 (2015-09-11)
5+
6+
This release adds support for secure HBase installations, more filters and
7+
greater configuration.
8+
9+
New public APIs:
10+
- The Config object handles configuration of the client and can be set
11+
manually or it may load a list of settings from a properties file.
12+
- Introduction of AppendRequest to allow for appending data to the value
13+
of a column in HBase. Appends can be buffered similar to PutRequests.
14+
- Introduction of Kerberos and simple authentication support against HBase
15+
region servers. Configuration is similar to the HTable client.
16+
- Introduction of locateRegions() and RegionLocation similar to HTable to
17+
allow users the ability to get a list of regions for a table.
18+
- Add filter support and timestamp ranges to GetRequests.
19+
- Add a socket idle handler to close connections to region clients after
20+
some period of inactivity.
21+
- Introduce RPC timeouts on either a global or per-RPC basis.
22+
- Netty threads are now named for easier debugging.
23+
- Add filters including FirstKeyOnlyFilter, ColumnPaginationFilter,
24+
KeyOnlyFilter and FuzzyRowFilter
25+
- Introduce the RegionClientStats object for tracking metrics around individual
26+
region client connections.
27+
28+
Noteworthy bug fixes:
29+
- Add the RegionOpeningException as a recoverable exception (#117)
30+
- Region clients can now check the status of the socket write buffer before
31+
sending RPCs to avoid OOM issues. Must be enabled via the config.
32+
- Fix a small meta lookup permit bug when an exception is thrown and the
33+
semaphore isn't released.
34+
- Fix an issue with stale region clients created when a region server
35+
restarts.
36+
- Fix a bug with CDH5 and HBase 0.96 when closing a scanner that has rows
37+
remaining to be read.
38+
- Fix a potential bug with decoding byte array backed ChannelBuffers in
39+
the region client.
40+
- Fix an issue where an RPC could be stranded in the inflight map when an
41+
exception is thrown.
42+
443
* Version 1.6.0 (2014-10-07) [a56249b]
544

645
This is mostly a bugfix release, but the introduction of a few new APIs made
@@ -265,4 +304,4 @@ POSSIBILITY OF SUCH DAMAGE.
265304

266305
Local Variables:
267306
mode: outline
268-
End:
307+
End:

README

+16
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,25 @@ interacting with any HBase API. This pays off in applications that are
1111
asynchronous by nature or that want to use several threads to interact
1212
efficiently with HBase.
1313

14+
Documentation can be found under http://opentsdb.github.io/asynchbase/
15+
1416
Please read the Javadoc starting from the HBaseClient class. This class
1517
replaces all your HTable instances. Unlike HTable, you should have only
1618
one instance of HBaseClient in your application, regardless of the number
1719
of tables or threads you want to use. The Javadoc also spells out rules
1820
you have to follow in order to use the API properly in a multi-threaded
1921
application.
22+
23+
The GitHub repo branches (https://github.com/OpenTSDB/asynchbase) are laid
24+
out as follows:
25+
26+
maintenance: This was the last stable version of AsyncHBase and should only
27+
have bug fix PRs created against it. Bugs should also be
28+
patched in master and next.
29+
30+
master: This is the current stable version of AsyncHBase and should only
31+
have bug fix PRs created against it. Bug should also be patched in
32+
the next branch.
33+
34+
next: This is the development version of AsyncHBase and all new features or
35+
API changes should be written against this.

THANKS

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,32 @@ AsyncHBase THANKS File
44
The following persons contributed to the library by reporting problems,
55
suggesting improvements, submitting patches or proofreading the code.
66

7+
Abhay Bothra
78
Andrey Stepachev
89
Arthur van Hoff
910
Berk D. Demir
1011
Brandon Forehand
12+
Charles Antoine
13+
Francis Christopher Liu
14+
Gabe Benjamin
1115
Guo Sijie
1216
Ishan Chhabra
1317
James Baldassari
18+
Jason Culverhouse
19+
Jesse Chang
1420
Jonathan Payne
1521
Michael Rose
1622
Michael Stack
1723
Nicolas Thiébaud
1824
Phil Smith
25+
Philip K. Warren
26+
Rajesh G
1927
Shrijeet Paliwal
20-
Michael Stack
28+
Siddartha Guthikonda
29+
Stephane Bagneris
2130
Viral Bajaria
2231
Xun Liu
32+
Yao Shengzhe
2333

2434
This list can be obtained at any time with the following one-liner:
2535
git log --pretty=format:'%an' | sort -u

asynchbase.conf

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# This is an example AsyncHBase client configuration file.
2+
# To use it, instantiate a config object with the path and then
3+
# instantiate an HBaseClient with the config.
4+
# final org.hbase.async.Config config =
5+
# new org.hbase.async.Config("path");
6+
# final org.hbase.async.HBaseClient client =
7+
# new org.hbase.async.HBaseClient(config);
8+
#
9+
# You can also copy and paste these properties in another config
10+
# file that is shared with your application.
11+
# All parameters have defaults except for the
12+
# hbase.zookeeper.quorum parameter that must have a list of
13+
# zookeeper hosts to connect to.
14+
15+
# A comma separated list of zookeeper servers. Ports are optional.
16+
# E.g. zk1.mysite.com:2181,zk2.mysite.com:2181,zk3.mysite.com:2181
17+
hbase.zookeeper.quorum=localhost
18+
19+
# The root node for HBase in Zookeeper
20+
#hbase.zookeeper.znode.parent=/hbase
21+
22+
# How often the timer should wake up to check for tasks to run
23+
# such as kerberos ticket renewals or flushing buffered increments.
24+
# The value is in milliseconds
25+
#hbase.timer.tick=20
26+
27+
# How often to retry an individual RPC against HBase. After this
28+
# many tries the RPC will return an exception.
29+
#hbase.rpcs.max_retry_attempts=10
30+
31+
# How often, in milliseconds, to flush buffered RPCs (such as puts
32+
# or appends) to the region servers.
33+
#hbase.rpcs.buffered_flush_interval=1000
34+
35+
# The maximum number of RPCs to queue per region when said region
36+
# is marked as offline due to a split or migration. Writes to any
37+
# region with a full NSRE queue will return a PleaseThrottleException.
38+
#hbase.nsre.high_watermark=10000
39+
40+
# How many individual atomic increment counters should be buffered
41+
# in memory. When this limit is reached, new counters are flushed
42+
# immediately and may result in higher RPC counts.
43+
#hbase.increments.buffer_size=65535
44+
45+
# -------------- SECURITY ------------------
46+
# A flag to determine if security should be used or not.
47+
#hbase.security.auth.enable=false
48+
49+
# A flag that must be set when using HBase version 0.94 for security
50+
# to function properly.
51+
#hbase.security.auth.94=false
52+
53+
# The mechanism to use for authentication. AsyncHBase supports
54+
# keberose or simple. When using keberos, you should create a
55+
# keytab file for your user and you must set the JAAS config file
56+
# by passing -Djava.security.login.auth.config=<path> to your JVM.
57+
#hbase.security.authentication=kerberos
58+
59+
# Whether or not RPCs should be encrypted in flight. Possible values
60+
# include:
61+
# authentication - no encryption
62+
# integrity - encrypted
63+
# privacy - encrypted
64+
#hbase.rpc.protection=authentication
65+
66+
# When using simple authentication, supply the username here.
67+
#hbase.security.simple.username=
68+
69+
# The principal to use when authenticating with Kerberos against
70+
# a region server. You can specify an explicit host name or use
71+
# the _HOST token that will be replaced by the hostname.
72+
#hbase.kerberos.regionserver.principal=hbase/[email protected]
73+
74+
# NOTE: Use keytabs instead!
75+
# A password to use for keberos authentication
76+
#hbase.regionserver.kerberos.password=
77+
78+
# The context name to use in the jaas.conf file you supplied to
79+
# java.security.login.auth.config when starting the JVM
80+
#hbase.sasl.clientconfig=Client

pom.xml.in

+15-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
<plugin>
129129
<groupId>org.apache.maven.plugins</groupId>
130130
<artifactId>maven-gpg-plugin</artifactId>
131-
<version>1.4</version>
131+
<version>1.5</version>
132132
<executions>
133133
<execution>
134134
<id>sign-artifacts</id>
@@ -138,8 +138,17 @@
138138
</goals>
139139
</execution>
140140
</executions>
141+
</plugin>
142+
143+
<plugin>
144+
<groupId>org.sonatype.plugins</groupId>
145+
<artifactId>nexus-staging-maven-plugin</artifactId>
146+
<version>1.6.3</version>
147+
<extensions>true</extensions>
141148
<configuration>
142-
<keyname>[email protected]</keyname>
149+
<serverId>ossrh</serverId>
150+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
151+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
143152
</configuration>
144153
</plugin>
145154

@@ -148,7 +157,10 @@
148157
<artifactId>maven-surefire-plugin</artifactId>
149158
<version>2.12.4</version>
150159
<configuration>
151-
<skipTests>${skipTests}</skipTests>
160+
<excludes>
161+
<exclude>**/TestIntegration.java</exclude>
162+
<exclude>**/TestIncrementCoalescing.java</exclude>
163+
</excludes>
152164
</configuration>
153165
</plugin>
154166

@@ -275,7 +287,6 @@
275287

276288
<properties>
277289
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
278-
<skipTests>true</skipTests>
279290
</properties>
280291

281292
<pluginRepositories>

0 commit comments

Comments
 (0)