Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
manolama committed Sep 11, 2015
2 parents 3129a89 + 83b0d49 commit 8bc58ec
Show file tree
Hide file tree
Showing 68 changed files with 16,041 additions and 440 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
pom.xml
target/
/bin/
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: java
before_install:
- wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz -O /tmp/protobuf-2.5.0.tar.gz
- tar -C /tmp -xvf /tmp/protobuf-2.5.0.tar.gz
- cd /tmp/protobuf-2.5.0 && ./configure --prefix=/usr && make --quiet && sudo make install
before_script:
- cd ~/build/*/asynchbase
- make pom.xml
script: export MAVEN_OPTS="-Xmx1024m" && mvn test --quiet
jdk:
- oraclejdk7
- openjdk6
notifications:
email: false
48 changes: 44 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ proto_builddir := $(top_builddir)/protobuf
spec_title := Asynchronous HBase Client
spec_vendor := The Async HBase Authors
# Semantic Versioning (see http://semver.org/).
spec_version := 1.6.0
spec_version := 1.7.0
jar := $(top_builddir)/asynchbase-$(spec_version).jar

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

asynchbase_SOURCES := \
src/AppendRequest.java \
src/AtomicIncrementRequest.java \
src/BatchableRpc.java \
src/BinaryComparator.java \
Expand All @@ -68,23 +69,28 @@ asynchbase_SOURCES := \
src/BufferedIncrement.java \
src/Bytes.java \
src/ClientStats.java \
src/ColumnPaginationFilter.java \
src/ColumnPrefixFilter.java \
src/ColumnRangeFilter.java \
src/CompareAndSetRequest.java \
src/CompareFilter.java \
src/Config.java \
src/ConnectionResetException.java \
src/Counter.java \
src/DeleteRequest.java \
src/DependentColumnFilter.java \
src/FamilyFilter.java \
src/FilterComparator.java \
src/FilterList.java \
src/FirstKeyOnlyFilter.java \
src/FuzzyRowFilter.java \
src/GetRequest.java \
src/HBaseClient.java \
src/HBaseException.java \
src/HBaseRpc.java \
src/HasFailedRpcException.java \
src/InvalidResponseException.java \
src/KeyOnlyFilter.java \
src/KeyRegexpFilter.java \
src/KeyValue.java \
src/MultiAction.java \
Expand All @@ -97,15 +103,22 @@ asynchbase_SOURCES := \
src/RecoverableException.java \
src/RegexStringComparator.java \
src/RegionClient.java \
src/RegionClientStats.java \
src/RegionInfo.java \
src/RegionLocation.java \
src/RegionOfflineException.java \
src/RegionMovedException.java \
src/RegionOpeningException.java \
src/RemoteException.java \
src/RpcTimedOutException.java \
src/RowFilter.java \
src/RowLock.java \
src/RowLockRequest.java \
src/ScanFilter.java \
src/Scanner.java \
src/SecureRpcHelper.java \
src/SecureRpcHelper94.java \
src/SecureRpcHelper96.java \
src/SingletonList.java \
src/SubstringComparator.java \
src/TableNotFoundException.java \
Expand All @@ -114,8 +127,12 @@ asynchbase_SOURCES := \
src/UnknownScannerException.java \
src/ValueFilter.java \
src/VersionMismatchException.java \
src/auth/ClientAuthProvider.java \
src/auth/KerberosClientAuthProvider.java \
src/auth/Login.java \
src/auth/SimpleClientAuthProvider.java \
src/jsr166e/LongAdder.java \
src/jsr166e/Striped64.java \
src/jsr166e/Striped64.java

protobuf_SOURCES := src/protobuf/ZeroCopyLiteralByteString.java

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

unittest_SRC := \
test/BaseTestHBaseClient.java \
test/BaseTestRegionClient.java \
test/BaseTestSecureRpcHelper.java \
test/PBufResponses.java \
test/TestConfig.java \
test/TestDeleteRequest.java \
test/TestGetRequest.java \
test/TestHBaseClient.java \
test/TestHBaseClientLocateRegion.java \
test/TestHBaseRpc.java \
test/TestMETALookup.java \
test/TestNSREs.java
test/TestMultiAction.java \
test/TestNSREs.java \
test/TestPutRequest.java \
test/TestRegionClient.java \
test/TestRegionClientDecode.java \
test/TestRegionClientSendRpc.java \
test/TestSecureRpcHelper.java \
test/TestSecureRpcHelper96.java \
test/TestSecureRpcHelper94.java \
test/TestZKClient.java \
test/auth/MockProvider.java \
test/auth/TestKerberosClientAuthProvider.java \
test/auth/TestLogin.java \
test/auth/TestSimpleClientAuthProvider.java

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

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

cli:
$(MAKE) run CLASS=Test
Expand Down
41 changes: 40 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
AsyncHBase - User visible and noteworthy changes.
This project uses Semantic Versioning (see http://semver.org/).

* Version 1.7.0 (2015-09-11)

This release adds support for secure HBase installations, more filters and
greater configuration.

New public APIs:
- The Config object handles configuration of the client and can be set
manually or it may load a list of settings from a properties file.
- Introduction of AppendRequest to allow for appending data to the value
of a column in HBase. Appends can be buffered similar to PutRequests.
- Introduction of Kerberos and simple authentication support against HBase
region servers. Configuration is similar to the HTable client.
- Introduction of locateRegions() and RegionLocation similar to HTable to
allow users the ability to get a list of regions for a table.
- Add filter support and timestamp ranges to GetRequests.
- Add a socket idle handler to close connections to region clients after
some period of inactivity.
- Introduce RPC timeouts on either a global or per-RPC basis.
- Netty threads are now named for easier debugging.
- Add filters including FirstKeyOnlyFilter, ColumnPaginationFilter,
KeyOnlyFilter and FuzzyRowFilter
- Introduce the RegionClientStats object for tracking metrics around individual
region client connections.

Noteworthy bug fixes:
- Add the RegionOpeningException as a recoverable exception (#117)
- Region clients can now check the status of the socket write buffer before
sending RPCs to avoid OOM issues. Must be enabled via the config.
- Fix a small meta lookup permit bug when an exception is thrown and the
semaphore isn't released.
- Fix an issue with stale region clients created when a region server
restarts.
- Fix a bug with CDH5 and HBase 0.96 when closing a scanner that has rows
remaining to be read.
- Fix a potential bug with decoding byte array backed ChannelBuffers in
the region client.
- Fix an issue where an RPC could be stranded in the inflight map when an
exception is thrown.

* Version 1.6.0 (2014-10-07) [a56249b]

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

Local Variables:
mode: outline
End:
End:
16 changes: 16 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,25 @@ interacting with any HBase API. This pays off in applications that are
asynchronous by nature or that want to use several threads to interact
efficiently with HBase.

Documentation can be found under http://opentsdb.github.io/asynchbase/

Please read the Javadoc starting from the HBaseClient class. This class
replaces all your HTable instances. Unlike HTable, you should have only
one instance of HBaseClient in your application, regardless of the number
of tables or threads you want to use. The Javadoc also spells out rules
you have to follow in order to use the API properly in a multi-threaded
application.

The GitHub repo branches (https://github.com/OpenTSDB/asynchbase) are laid
out as follows:

maintenance: This was the last stable version of AsyncHBase and should only
have bug fix PRs created against it. Bugs should also be
patched in master and next.

master: This is the current stable version of AsyncHBase and should only
have bug fix PRs created against it. Bug should also be patched in
the next branch.

next: This is the development version of AsyncHBase and all new features or
API changes should be written against this.
12 changes: 11 additions & 1 deletion THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@ AsyncHBase THANKS File
The following persons contributed to the library by reporting problems,
suggesting improvements, submitting patches or proofreading the code.

Abhay Bothra
Andrey Stepachev
Arthur van Hoff
Berk D. Demir
Brandon Forehand
Charles Antoine
Francis Christopher Liu
Gabe Benjamin
Guo Sijie
Ishan Chhabra
James Baldassari
Jason Culverhouse
Jesse Chang
Jonathan Payne
Michael Rose
Michael Stack
Nicolas Thiébaud
Phil Smith
Philip K. Warren
Rajesh G
Shrijeet Paliwal
Michael Stack
Siddartha Guthikonda
Stephane Bagneris
Viral Bajaria
Xun Liu
Yao Shengzhe

This list can be obtained at any time with the following one-liner:
git log --pretty=format:'%an' | sort -u
80 changes: 80 additions & 0 deletions asynchbase.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# This is an example AsyncHBase client configuration file.
# To use it, instantiate a config object with the path and then
# instantiate an HBaseClient with the config.
# final org.hbase.async.Config config =
# new org.hbase.async.Config("path");
# final org.hbase.async.HBaseClient client =
# new org.hbase.async.HBaseClient(config);
#
# You can also copy and paste these properties in another config
# file that is shared with your application.
# All parameters have defaults except for the
# hbase.zookeeper.quorum parameter that must have a list of
# zookeeper hosts to connect to.

# A comma separated list of zookeeper servers. Ports are optional.
# E.g. zk1.mysite.com:2181,zk2.mysite.com:2181,zk3.mysite.com:2181
hbase.zookeeper.quorum=localhost

# The root node for HBase in Zookeeper
#hbase.zookeeper.znode.parent=/hbase

# How often the timer should wake up to check for tasks to run
# such as kerberos ticket renewals or flushing buffered increments.
# The value is in milliseconds
#hbase.timer.tick=20

# How often to retry an individual RPC against HBase. After this
# many tries the RPC will return an exception.
#hbase.rpcs.max_retry_attempts=10

# How often, in milliseconds, to flush buffered RPCs (such as puts
# or appends) to the region servers.
#hbase.rpcs.buffered_flush_interval=1000

# The maximum number of RPCs to queue per region when said region
# is marked as offline due to a split or migration. Writes to any
# region with a full NSRE queue will return a PleaseThrottleException.
#hbase.nsre.high_watermark=10000

# How many individual atomic increment counters should be buffered
# in memory. When this limit is reached, new counters are flushed
# immediately and may result in higher RPC counts.
#hbase.increments.buffer_size=65535

# -------------- SECURITY ------------------
# A flag to determine if security should be used or not.
#hbase.security.auth.enable=false

# A flag that must be set when using HBase version 0.94 for security
# to function properly.
#hbase.security.auth.94=false

# The mechanism to use for authentication. AsyncHBase supports
# keberose or simple. When using keberos, you should create a
# keytab file for your user and you must set the JAAS config file
# by passing -Djava.security.login.auth.config=<path> to your JVM.
#hbase.security.authentication=kerberos

# Whether or not RPCs should be encrypted in flight. Possible values
# include:
# authentication - no encryption
# integrity - encrypted
# privacy - encrypted
#hbase.rpc.protection=authentication

# When using simple authentication, supply the username here.
#hbase.security.simple.username=

# The principal to use when authenticating with Kerberos against
# a region server. You can specify an explicit host name or use
# the _HOST token that will be replaced by the hostname.
#hbase.kerberos.regionserver.principal=hbase/[email protected]

# NOTE: Use keytabs instead!
# A password to use for keberos authentication
#hbase.regionserver.kerberos.password=

# The context name to use in the jaas.conf file you supplied to
# java.security.login.auth.config when starting the JVM
#hbase.sasl.clientconfig=Client
19 changes: 15 additions & 4 deletions pom.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -138,8 +138,17 @@
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<keyname>[email protected]</keyname>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>

Expand All @@ -148,7 +157,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>${skipTests}</skipTests>
<excludes>
<exclude>**/TestIntegration.java</exclude>
<exclude>**/TestIncrementCoalescing.java</exclude>
</excludes>
</configuration>
</plugin>

Expand Down Expand Up @@ -275,7 +287,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skipTests>true</skipTests>
</properties>

<pluginRepositories>
Expand Down
Loading

0 comments on commit 8bc58ec

Please sign in to comment.