Skip to content

Commit

Permalink
Netty 4.0: merged with 1.8-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
ooasis committed May 6, 2016
2 parents 9d06f7f + 6a17aaa commit 1303e11
Show file tree
Hide file tree
Showing 18 changed files with 1,353 additions and 81 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: java
before_install:
- cat /etc/hosts # optionally check the content *before*
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- cat /etc/hosts # optionally check the content *after*
- 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
Expand All @@ -12,3 +16,5 @@ jdk:
- openjdk6
notifications:
email: false
addons:
hostname: short-hostname
6 changes: 5 additions & 1 deletion 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.7.1-SNAPSHOT
spec_version := 1.8.0-SNAPSHOT
jar := $(top_builddir)/asynchbase-$(spec_version).jar

asynchbase_PROTOS := \
Expand Down Expand Up @@ -109,6 +109,8 @@ asynchbase_SOURCES := \
src/RegionOfflineException.java \
src/RegionMovedException.java \
src/RegionOpeningException.java \
src/RegionServerAbortedException.java \
src/RegionServerStoppedException.java \
src/RemoteException.java \
src/RpcTimedOutException.java \
src/RowFilter.java \
Expand All @@ -119,6 +121,7 @@ asynchbase_SOURCES := \
src/SecureRpcHelper.java \
src/SecureRpcHelper94.java \
src/SecureRpcHelper96.java \
src/ServerNotRunningYetException.java \
src/SingletonList.java \
src/SubstringComparator.java \
src/TableNotFoundException.java \
Expand Down Expand Up @@ -168,6 +171,7 @@ unittest_SRC := \
test/TestRegionClient.java \
test/TestRegionClientDecode.java \
test/TestRegionClientSendRpc.java \
test/TestScanner.java \
test/TestSecureRpcHelper.java \
test/TestSecureRpcHelper96.java \
test/TestSecureRpcHelper94.java \
Expand Down
34 changes: 32 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AsyncHBase - User visible and noteworthy changes.
This project uses Semantic Versioning (see http://semver.org/).

* Version 1.7.1 (??)
* Version 1.7.1 (2016-02-10)

This is a bug fix release.

Expand Down Expand Up @@ -49,6 +49,36 @@ Noteworthy bug fixes:
- 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
it become 1.6.0 instead of 1.5.1.

New public APIs:
- Introduction of RegionMovedException.
- Introduction of a lot of new filters (BinaryComparator,
BinaryPrefixComparator, BitComparator, CompareFilter,
DependentColumnFilter, FamilyFilter, FilterComparator,
QualifierFilter, RegexStringComparator, RowFilter,
SubstringComparator, TimestampsFilter, ValueFilter).
Noteworthy bug fixes:
- When a region was unavailable, some RPCs could be spuriously retried more
than once, which could lead to double-counting when the RPC was an atomic
increment (#81).
- Fix an error handling bug that arises when an RPC response fails to be
de-serialized properly (something that shouldn't happen in the first
place).
- Fix a compatibility issue with the latest versions of CDH5 that were
causing scanners to raise an InvalidResponseException.
- Properly handle RegionMovedException.
- Make our probes to recover from moving regions more lightweight by
crafting an unlikely key that is very unlikely to be present in the table,
since unfortunately exists() still materializes the row in memory in the
RegionServer, which is problematic for tables with big rows (#82).
- Fixed an off-by-one in the serialization of batched RPCs that could lead
to an uncaught IndexOutOfBoundsException.


* Version 1.5.0 (2013-12-13) [67fc3b7]

This release introduces compatibility with HBase 0.96 and up, and adds
Expand Down Expand Up @@ -283,4 +313,4 @@ POSSIBILITY OF SUCH DAMAGE.

Local Variables:
mode: outline
End:
End:
11 changes: 11 additions & 0 deletions src/Bytes.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ public final class Bytes {
private Bytes() { // Can't instantiate.
}

/**
* Create a max byte array with the specified max byte count
* @param num_bytes the length of returned byte array
* @return the created max byte array
*/
public static byte[] createMaxByteArray(int num_bytes) {
byte[] max_byte_arr = new byte[num_bytes];
Arrays.fill(max_byte_arr, (byte) 0xff);
return max_byte_arr;
}

// ------------------------------ //
// Byte array conversion utilies. //
// ------------------------------ //
Expand Down
1 change: 1 addition & 0 deletions src/CompareAndSetRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ ByteBuf serialize(byte server_version) {
MutationProto.ColumnValue.QualifierValue.newBuilder()
.setQualifier(qualifier)
.setValue(value)
.setTimestamp(put.timestamp())
.build();
final MutationProto.ColumnValue column =
MutationProto.ColumnValue.newBuilder()
Expand Down
5 changes: 4 additions & 1 deletion src/GetRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ private GetRequest(final float unused,
* indicating whether or not the given table / key exists.
*/
static HBaseRpc exists(final byte[] table, final byte[] key) {
return new GetRequest(0F, table, key);
final GetRequest rpc = new GetRequest(0F, table, key);
rpc.setProbe(true);
return rpc;
}

/**
Expand All @@ -206,6 +208,7 @@ static HBaseRpc exists(final byte[] table,
final byte[] key, final byte[] family) {
final GetRequest rpc = new GetRequest(0F, table, key);
rpc.family(family);
rpc.setProbe(true);
return rpc;
}

Expand Down
Loading

0 comments on commit 1303e11

Please sign in to comment.