Skip to content

Commit fe7800d

Browse files
committed
Merge branch 'develop' into streaming-api
2 parents d87edb4 + f0c2815 commit fe7800d

390 files changed

Lines changed: 15830 additions & 9038 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66

77
*.png binary
88
*.jpg binary
9+
*.jar binary

.github/CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
##Contributing
2+
3+
This repo's maintainers are engineers at Basho and welcome your contribution to this project.
4+
5+
## How-to contribute to the Java client
6+
7+
**_IMPORTANT_**: This is an open source project licensed under the Apache 2.0 License. We encourage contributions to the project from the community. We ask that you keep in mind these considerations when planning your contribution.
8+
9+
* Whether your contribution is for a bug fix or a feature request, **create an [Issue](https://github.com/basho/riak-java-client/issues)** and let us know what you are thinking.
10+
* **For bugs**, if you have already found a fix, feel free to submit a Pull Request referencing the Issue you created.
11+
* **For feature requests**, we want to improve upon the library incrementally which means small changes at a time. In order ensure your PR can be reviewed in a timely manner, please keep PRs small, e.g. <10 files and <500 lines changed. If you think this is unrealistic, then mention that within the Issue and we can discuss it.
12+
13+
### Pull Request Process
14+
15+
Here’s how to get started:
16+
17+
* Fork the appropriate sub-projects that are affected by your change.
18+
* Create a topic branch for your change and checkout that branch.
19+
`git checkout -b some-topic-branch`
20+
* Make your changes and run the test suite.
21+
* Commit your changes and push them to your fork.
22+
* Open pull-requests for the appropriate projects.
23+
* Contributors will review your pull request, suggest changes, and merge it when it’s ready and/or offer feedback.
24+
* To report a bug or issue, please open a new issue against this repository.
25+
26+
You can [read the full guidelines for bug reporting and code contributions](http://docs.basho.com/riak/latest/community/bugs/) on the Riak Docs.

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Please ensure the following information is supplied for new issues:
2+
3+
- [ ] Riak Java Client version
4+
- [ ] Java version
5+
- [ ] Riak version
6+
- [ ] Operating System / Distribution & Version
7+
- [ ] Riak's `error.log` file, if applicable
8+
- [ ] What methods were being executed during the error
9+
- [ ] What you *expected* to have happen
10+
- [ ] Sample data, if applicable

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Please ensure the following is present in your PR:
2+
3+
- [ ] Unit tests for your change
4+
- [ ] Integration tests (if applicable)
5+
6+
Pull requests that are small and limited in scope are most welcome.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ lib
33
classes
44
target
55
.settings
6-
*.jar
76
.classpath
87
.project
98
.idea

.travis.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
set -o nounset
5+
6+
if [[ -z $RIAK_FLAVOR ]]
7+
then
8+
echo 'RIAK_FLAVOR must be set' 1>&2
9+
exit 1
10+
fi
11+
12+
if [[ $RIAK_DOWNLOAD_URL == 'docker' ]]
13+
then
14+
if [[ $RIAK_FLAVOR == 'riak-ts' ]]
15+
then
16+
TAG='1.4.0'
17+
else
18+
TAG='latest'
19+
fi
20+
docker run --name "$RIAK_FLAVOR" -d -p 8087:8087 -p 8098:8098 "basho/$RIAK_FLAVOR:$TAG"
21+
docker exec "$RIAK_FLAVOR" riak-admin wait-for-service riak_kv
22+
./tools/devrel/riak-cluster-config "docker exec $RIAK_FLAVOR riak-admin" 8098 false false
23+
else
24+
sudo ./tools/travis-ci/riak-install -d "$RIAK_DOWNLOAD_URL"
25+
sudo ./tools/devrel/riak-cluster-config "$(which riak-admin)" 8098 false false
26+
fi

.travis.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1+
sudo: required
2+
dist: trusty
13
language: java
2-
script: mvn -Pitest -DargLine="-Dcom.basho.riak.search=true -Dcom.basho.riak.2i=true" clean verify
3-
notifications:
4-
# Email notifications are disabled to not annoy anybody.
5-
# See http://about.travis-ci.org/docs/user/build-configuration/ to learn more
6-
# about configuring notification recipients and more.
7-
webhooks: http://basho-engbot.herokuapp.com/travis?key=a8f477c8cdaabc8118d2a650281ff4a71eff875f
8-
email: false
4+
jdk: oraclejdk8
95
services:
10-
- riak
6+
- docker
7+
cache:
8+
directories:
9+
- "$HOME/.m2"
10+
before_script:
11+
- ./.travis.sh
12+
script:
13+
- if [ $RIAK_FLAVOR == "riak-kv" ]; then mvn -Pitest,default -Dcom.basho.riak.yokozuna=false verify; else echo "Not riak-kv flavor"; fi
14+
- if [ $RIAK_FLAVOR == "riak-ts" ]; then mvn -Pitest,default -Dcom.basho.riak.yokozuna=false -Dcom.basho.riak.timeseries=true verify; else echo "Not riak-ts flavor"; fi
15+
after_script:
16+
- docker rm -f $RIAK_FLAVOR
17+
env:
18+
matrix:
19+
- RIAK_FLAVOR=riak-ts RIAK_DOWNLOAD_URL=docker
20+
- RIAK_FLAVOR=riak-kv RIAK_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak/2.0/2.0.7/ubuntu/trusty/riak_2.0.7-1_amd64.deb
21+
- RIAK_FLAVOR=riak-kv RIAK_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.4/ubuntu/trusty/riak_2.1.4-1_amd64.deb
22+
global:
23+
- RIAK_HOSTS=localhost:8087
24+
notifications:
25+
slack:
26+
secure: lCGUVnffHyrS1rpOlencvFdID7pVF2leOvbmxAKf/svkjJDLd0BWa9SgLjUDtAQ7vCa8B03rO0fWmlyynDJBQmudjytm+h8BVgAFJNm0SQOAm4ALNsWmixo4XoXhPl3rl3VmXRrx/bvLI8nA4ZIARak6RXoOXqHnl8KmkNhhxw8=

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@ compile:
77

88
test: unit-test integration-test
99

10+
test-ts: unit-test integration-test-timeseries
11+
1012
unit-test:
1113
mvn test
1214

1315
integration-test:
14-
mvn -Pitest,default -Dcom.basho.riak.2i=true -Dcom.basho.riak.yokozuna=true -Dcom.basho.riak.buckettype=true -Dcom.basho.riak.crdt=true -Dcom.basho.riak.lifecycle=true -Dcom.basho.riak.pbcport=$(RIAK_PORT) verify
16+
mvn -Pitest,default -Dcom.basho.riak.pbcport=$(RIAK_PORT) verify
17+
18+
integration-test-hll:
19+
mvn -Pitest,default -Dcom.basho.riak.pbcport=$(RIAK_PORT) -Dcom.basho.riak.hlldt=true verify
1520

1621
integration-test-timeseries:
17-
mvn -Pitest,default -Dcom.basho.riak.buckettype=true -Dcom.basho.riak.crdt=true -Dcom.basho.riak.lifecycle=true -Dcom.basho.riak.timeseries=true -Dcom.basho.riak.pbcport=$(RIAK_PORT) verify
22+
mvn -Pitest,default -Dcom.basho.riak.timeseries=true -Dcom.basho.riak.pbcport=$(RIAK_PORT) verify
1823

1924
integration-test-security:
2025
mvn -Pitest,default -Dcom.basho.riak.security=true -Dcom.basho.riak.security.clientcert=true -Dcom.basho.riak.pbcport=$(RIAK_PORT) test-compile failsafe:integration-test

README.md

Lines changed: 96 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Please see the [Release Notes](https://github.com/basho/riak-java-client/blob/de
1010
1. [Installation](#installation)
1111
2. [Documentation](#documentation)
1212
3. [Contributing](#contributing)
13-
* [`riak_pb` dependency](#riak_pb-dependency)
14-
* [Security Tests](security-tests)
13+
* [Integration Tests Setup](#integration-tests-setup)
14+
* [Running Integration Tests](#running-integration-tests)
15+
* [Security Tests](#security-tests)
1516
* [An honest disclaimer](#an-honest-disclaimer)
1617
4. [Roadmap](#roadmap)
1718
5. [License and Authors](#license-and-authors)
@@ -39,7 +40,7 @@ This client is published to Maven Central and can be included in your project by
3940
<dependency>
4041
<groupId>com.basho.riak</groupId>
4142
<artifactId>riak-client</artifactId>
42-
<version>2.0.4</version>
43+
<version>2.0.7</version>
4344
</dependency>
4445
...
4546
</dependencies>
@@ -57,55 +58,112 @@ Also see [the Javadoc site](http://basho.github.io/riak-java-client/) for more i
5758

5859
## Contributing
5960

60-
#### `riak_pb` dependency
61-
To build the Riak Java Client, you must have the correct version of the riak_pb dependency installed to your local Maven repository.
61+
#### Integration Tests Setup
6262

63+
We've included Basho's [riak-client-tools](https://github.com/basho/riak-client-tools/) as a git submodule to help with Riak test setup and teardown.
64+
You can find these tools in the `/tools` subdirectory.
65+
66+
To configure your single riak instance, you may use the [riak-cluster-config](https://github.com/basho/riak-client-tools/blob/master/devrel/riak-cluster-config) script to setup the node with the appropriate bucket types.
67+
You can use it by running `tools/devrel/riak-cluster-config $PATH_TO_RIAK_ADMIN $RIAK_HTTP_PORT false false` with the appropriate paths and values filled in.
68+
69+
To configure a devrel for multiple node testing, please see the instructions located at [basho/riak-client-tools](https://github.com/basho/riak-client-tools/blob/master/devrel/README.md) on how to use the `devrel/setup-dev-cluster` command.
70+
71+
#### Running Integration Tests
72+
73+
To run the Riak KV integration test suite, execute:
74+
```
75+
make RIAK_PORT=8087 integration-test
76+
```
77+
78+
To run the Riak TimeSeries test suite, execute:
6379
```
64-
git clone https://github.com/basho/riak_pb
65-
git checkout java-2.1.1.0
66-
mvn clean install
80+
make RIAK_PORT=8087 integration-test-timeseries
6781
```
6882

83+
When running tests directly from Maven, you may also turn feature sets on and off with system properties:
84+
```
85+
mvn -Pitest,default -Dcom.basho.riak.timeseries=true -Dcom.basho.riak.pbcport=$(RIAK_PORT) verify
86+
```
87+
88+
The supported test flags are:
89+
90+
System Property | Default Value | Note
91+
--------------- | ------------- | ----
92+
com.basho.riak.buckettype | true | Riak KV 2.0 Bucket Type Tests
93+
com.basho.riak.yokozuna | true | Riak KV 2.0 Solr/Yokozuna Search Tests
94+
com.basho.riak.2i | true | Riak KV Secondary Index Tests
95+
com.basho.riak.mr | true | Riak KV MapReduce Tests
96+
com.basho.riak.crdt | true | Riak KV 2.0 Data Type Tests
97+
com.basho.riak.hlldt | true | Riak KV 2.2 HyperLogLog Data Type Tests
98+
com.basho.riak.lifecycle | true | Java Client Node/Cluster Lifecycle Tests
99+
com.basho.riak.timeseries | false | Riak TS TimeSeries Tests
100+
com.basho.riak.riakSearch | false | Riak KV 1.0 Legacy Search Tests
101+
com.basho.riak.coveragePlan | false | Riak KV/TS Coverage Plan Tests <br>(need cluster to run these )
102+
com.basho.riak.security | false | Riak Security Tests
103+
com.basho.riak.clientcert | false | Riak Security Tests with Certificates
104+
105+
Some tests may require more than one feature to run, so please check the test to see which ones are required before running.
106+
107+
Connection Options
108+
109+
System Property | Default Value | Note
110+
--- | --- | ---
111+
com.basho.riak.host | `127.0.0.1` | The hostname to connect to for tests
112+
com.basho.riak.pbcport | `8087` | The Protocol Buffers port to connect to for tests
113+
69114
#### Security tests
70115
To run the security-related integration tests, you will need to:
71116

72-
1) Setup the certs by running the buildbot makefile's "configure-security-certs" target
73-
cd buildbot;
74-
make configure-security-certs;
75-
cd ../;
117+
1) Setup the certs by running the buildbot makefile's `configure-security-certs` target.
118+
```
119+
cd buildbot;
120+
make configure-security-certs;
121+
cd ../;
122+
```
76123

77-
2) Copy the certs to your Riak's etc dir, and configure the riak.conf file to use them
78-
resources_dir=./src/test/resources
79-
riak_etc_dir=/fill/in/this/path/
124+
2) Copy the certs to your Riak's etc dir, and configure the riak.conf file to use them.
80125

81-
# Shell
82-
cp $resources_dir/cacert.pem $riak_etc_dir
83-
cp $resources_dir/riak-test-cert.pem $riak_etc_dir
84-
cp $resources_dir/riakuser-client-cert.pem $riak_etc_dir
126+
```
127+
resources_dir=./src/test/resources
128+
riak_etc_dir=/fill/in/this/path/
85129
86-
# riak.conf file additions
87-
ssl.certfile = (riak_etc_dir)/cert.pem
88-
ssl.keyfile = (riak_etc_dir)/key.pem
89-
ssl.cacertfile = (riak_etc_dir)/cacert.pem
130+
# Shell
131+
cp $resources_dir/cacert.pem $riak_etc_dir
132+
cp $resources_dir/riak-test-cert.pem $riak_etc_dir
133+
cp $resources_dir/riakuser-client-cert.pem $riak_etc_dir
90134
91-
3) Enable Riak Security
92-
riak-admin security enable
135+
# riak.conf file additions
136+
ssl.certfile = (riak_etc_dir)/cert.pem
137+
ssl.keyfile = (riak_etc_dir)/key.pem
138+
ssl.cacertfile = (riak_etc_dir)/cacert.pem
139+
```
93140

94-
4) create a user "riakuser" with the password "riak_cert_user" and configure it with certificate as a source
95-
riak-admin security add-user riakuser
96-
riak-admin security add-source riakuser 0.0.0.0/0 certificate
141+
3) Enable Riak Security.
142+
```
143+
riak-admin security enable
144+
```
145+
4) Create a user "riakuser" with the password "riak_cert_user" and configure it with certificate as a source
146+
```
147+
riak-admin security add-user riakuser
148+
riak-admin security add-source riakuser 0.0.0.0/0 certificate
149+
```
97150

98-
5) create a user "riak_trust_user" with the password "riak_trust_user" and configure it with trust as a
99-
source
100-
riak-admin security add-user riak_trust_user password=riak_trust_user
101-
riak-admin security add-source riak_trust_user 0.0.0.0/0 trust
151+
5) Create a user "riak_trust_user" with the password "riak_trust_user" and configure it with trust as a source.
152+
```
153+
riak-admin security add-user riak_trust_user password=riak_trust_user
154+
riak-admin security add-source riak_trust_user 0.0.0.0/0 trust
155+
```
102156

103-
6) create a user "riakpass" with the password "riak_passwd_user" and configure it with password as a source
104-
riak-admin security add-user riakpass password=Test1234
105-
riak-admin security add-source riakpass 0.0.0.0/0 password
157+
6) Create a user "riakpass" with the password "riak_passwd_user" and configure it with password as a source.
158+
```
159+
riak-admin security add-user riakpass password=Test1234
160+
riak-admin security add-source riakpass 0.0.0.0/0 password
161+
```
106162

107-
7) Run the Test suit with the com.basho.riak.security and com.basho.riak.security.clientcert flags set to
108-
true
163+
7) Run `integration-test-security` target of the makefile.
164+
```
165+
make integration-test-security
166+
```
109167

110168

111169
This repository's maintainers are engineers at Basho and we welcome your contribution to the project! Review the details in [CONTRIBUTING.md](CONTRIBUTING.md) in order to give back to this project.
@@ -123,7 +181,7 @@ Thank you for being part of the community!
123181
TODO
124182

125183
## License and Authors
126-
**The Riak Java** Client is Open Source software released under the Apache 2.0 License. Please see the [LICENSE](LICENSE) file for full license details.
184+
**The Riak Java Client** is Open Source software released under the Apache 2.0 License. Please see the [LICENSE](LICENSE) file for full license details.
127185

128186
* Author: [Alex Moore](https://github.com/alexmoore)
129187
* Author: [Brian Roach](https://github.com/broach)

RELNOTES.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
Release Notes
22
=============
33

4+
### 2.0.8
5+
6+
Following issues / PRs addressed:
7+
8+
* [Upgrade Netty to 4.1.5 to address higher memory usage with Netty 4.1.3](https://github.com/basho/riak-java-client/pull/671)
9+
10+
### 2.0.7
11+
12+
**Notes**
13+
* This will be the last version of Riak Java Client that supports Java 7.
14+
* Some of the changes are binary-incompatible with RJC 2.0.6, so you will need to recompile your project with this new version.
15+
16+
Following issues / PRs addressed:
17+
18+
* [Fixed - Disallow 0 as a timeout value for TimeSeries operations](https://github.com/basho/riak-java-client/pull/662)
19+
* Fixed - In `RiakUserMetadata#containsKey()`, use the charset method parameter when encoding the key [[1]](https://github.com/basho/riak-java-client/pull/558), [[2]](https://github.com/basho/riak-java-client/pull/646)
20+
* Fixed - Don't return success to update future after fetch future error [[1]](https://github.com/basho/riak-java-client/pull/633), [[2]](https://github.com/basho/riak-java-client/pull/636)
21+
* [Fixed - Demoted "channel close" log messages to info level](https://github.com/basho/riak-java-client/pull/637)
22+
* [Fixed - Made domain name more invalid for `UnknownHostException` test](https://github.com/basho/riak-java-client/pull/641)
23+
* [Fixed - Separate Content-type and charset in `RiakObject`](https://github.com/basho/riak-java-client/pull/647)
24+
* [Fixed - BinaryValue JSON encoding for MapReduce inputs](https://github.com/basho/riak-java-client/pull/655)
25+
* [Fixed - Catch & handle `BlockingOperationException` in `RiakNode#execute`](https://github.com/basho/riak-java-client/pull/661)
26+
* Added Batch Delete Command [[1]](https://github.com/basho/riak-java-client/pull/487), [[2]](https://github.com/basho/riak-java-client/pull/650)
27+
* Added `equals()`, `hashCode()`, `toString()` to `RiakObject` and associated files [[1]](https://github.com/basho/riak-java-client/pull/557), [[2]](https://github.com/basho/riak-java-client/pull/648)
28+
* Added `getLocation()` to `KvResponseBase` [[1]](https://github.com/basho/riak-java-client/pull/606), [[2]](https://github.com/basho/riak-java-client/pull/643)
29+
* [Added creation of `RiakClient` from a collection of `HostAndPort` objects](https://github.com/basho/riak-java-client/pull/607)
30+
* Added overload of `RiakClient#execute` that accepts a timeout [[1]](https://github.com/basho/riak-java-client/pull/610), [[2]](https://github.com/basho/riak-java-client/pull/642)
31+
* [Added shortcut commands for $bucket and $key 2i indices](https://github.com/basho/riak-java-client/pull/652)
32+
* [Added `isNotFound()` field to data type responses](https://github.com/basho/riak-java-client/pull/654)
33+
* Added - Dataplatform / Riak Spark Connector changes merged back into main client [[1]](https://github.com/basho/riak-java-client/pull/621), [[2]](https://github.com/basho/riak-java-client/pull/626), [[3]](https://github.com/basho/riak-java-client/pull/644), [[4]](https://github.com/basho/riak-java-client/pull/659), [[5]](https://github.com/basho/riak-java-client/pull/665)
34+
* [Updated plugins and dependencies](https://github.com/basho/riak-java-client/pull/631)
35+
* [Updated TS objects and Commands for TS 1.4](https://github.com/basho/riak-java-client/pull/651)
36+
* [Enhanced - Made Integration Tests Great Again](https://github.com/basho/riak-java-client/pull/657)
37+
* [Removed Antlr dependency](https://github.com/basho/riak-java-client/pull/629)
38+
39+
Special thanks to @bwittwer, @stela, @gerardstannard, @christopherfrieler, @guidomedina, @Tolsi, @hankipanky, @gfbett, @TimurFayruzov, @urzhumskov, @srgg, @aleksey-suprun, @jbrisbin, @christophermancini, and @lukebakken for all the PRs, reported issues, and reviews.
40+
441
### 2.0.6
542
Following issues / PRs addressed:
643
* [Removed riak_pb external dependency](https://github.com/basho/riak-java-client/pull/615)

0 commit comments

Comments
 (0)