Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0535126
Initial Data Platform rebranding
srgg Jul 2, 2015
217eb34
Adds initial support of CoverangePlan command and support of coverCo…
srgg Jul 9, 2015
f5fa340
Adds HostAndPort.getPortOrDefault()
srgg Jul 10, 2015
aeb0988
Makes CoverageEntry serializable
srgg Jul 15, 2015
3a76c34
Fix BinIndexQuery type inconsistency
srgg Jul 17, 2015
eec7107
the experimental try to avoid necessarily of key range values for the…
srgg Jul 20, 2015
48b6930
CoveragePlan related code was updated according the latest riak_pb, i…
srgg Jul 21, 2015
091f96c
Java 1.7 compatibility issue
srgg Jul 24, 2015
2511a49
Removes unused/commented code
srgg Jul 24, 2015
b3cc4b2
Rename coverContext => coverageContext
srgg Jul 24, 2015
f57107d
Fix 2i range local reads
srgg Jul 24, 2015
05c044e
Bumped pom to 1.0.0.beta2
srgg Jul 31, 2015
844d768
LICENSE
srgg Aug 26, 2015
209a8a2
Adding me as a joint author
srgg Sep 2, 2015
b6e7250
Bumped pom to 2.0.3
srgg Sep 2, 2015
066f3c0
Added gradle-wrapper.jar
srgg Sep 2, 2015
68d920b
Bumped versions to dataplatform-riak-client-1.0.0
srgg Sep 2, 2015
4596f30
Added com.google.protobuf to the shaded artifact
srgg Sep 2, 2015
e1c44d7
Bumped versions to dataplatform-riak-client-1.1.0.beta1
srgg Sep 18, 2015
7b9426d
In order to reuse setupIndexTestData() it was moved to ITestBase
srgg Sep 17, 2015
1b1cd00
Added FullBucketRead command that supports streaming values
srgg Sep 17, 2015
ec06e77
RpbIndexBodyResp support was added to SecondaryIndexQueryOperation
srgg Oct 13, 2015
c153410
bump versions to 1.1.0.beta2
srgg Nov 11, 2015
5153023
Bump version to 1.1.0
jbrisbin Dec 2, 2015
5e5c970
Update Travis build for publishing to Artifactory
jbrisbin Dec 10, 2015
0edca82
Add secure resolver config.
jbrisbin Dec 16, 2015
466a3b8
Tweak to build file.
jbrisbin Dec 16, 2015
6592c1e
java source compatibility version changed to 1.7
vikua Dec 16, 2015
8f9f167
Bump version to 1.2.0-beta1, add Artifactory publish
jbrisbin Jan 14, 2016
fafa05e
Added Basho Artifactory repo.
jbrisbin Jan 14, 2016
d3b420f
Changed version to 1.2.0-SNAPSHOT
jbrisbin Jan 14, 2016
f365d31
Coverage entry verification to be sure that CoveragePlan doesn't have…
srgg Feb 17, 2016
1611931
Bump version to 1.3.0-beta1
srgg Feb 23, 2016
062c956
[SPARK-78] Fix for argument type in CoveragePlanOperation.AbstractBui…
oleksii-suprun Mar 24, 2016
5afa6d0
Tests added to check RiakKV behavior in case of unavailability of sui…
AleksandrPavlenko Apr 8, 2016
bc22afb
[SPARK-119] Add RiakTS Coverage Plan support to dataplatform java client
zkhadikova Apr 13, 2016
5b9c07c
Bump version to 1.5.0-SNAPSHOT
oleksii-suprun Apr 15, 2016
78b0224
Bump version to 1.5.1-SNAPSHOT
oleksii-suprun Apr 15, 2016
689148f
Automatic RiakTS Test table creation added to integration tests
srgg Apr 21, 2016
ebce61a
Return riak client branding back in pom.xml
srgg Apr 21, 2016
5bd8354
Merge branch 'develop' into merge-dpclient
alexmoore May 9, 2016
bd6cf99
Fix merge issues
alexmoore May 9, 2016
2396fcf
Add test for coverage context in TTBCodec
alexmoore May 18, 2016
5fa483b
Merge pull request #621 from basho/merge-dpclient-ts1.3
srgg Jun 13, 2016
c125edc
[SPARK-165] Adjust merged riak-java-client according to comments
oleksii-suprun Jun 2, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

*.png binary
*.jpg binary
*.jar binary
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ lib
classes
target
.settings
*.jar
.classpath
.project
.idea
Expand Down
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
language: java
script: mvn -Pitest -DargLine="-Dcom.basho.riak.search=true -Dcom.basho.riak.2i=true" clean verify
notifications:
# Email notifications are disabled to not annoy anybody.
# See http://about.travis-ci.org/docs/user/build-configuration/ to learn more
# about configuring notification recipients and more.
webhooks: http://basho-engbot.herokuapp.com/travis?key=a8f477c8cdaabc8118d2a650281ff4a71eff875f
email: false
services:
- riak
script:
- "mvn deploy -DskipTests"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To build the Riak Java Client, you must have the correct version of the riak_pb

```
git clone https://github.com/basho/riak_pb
git checkout java-2.1.1.0
git checkout 2.1.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We include riak_pb as a submodule now, so we can remove this step once that develop is merged back to this branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rebase from the latest develop, that should resolve this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srgg I have a branch that does that - There were some changes to the TSQuery command since we switched to term-to-binary support. https://github.com/basho/riak-java-client/tree/merge-dpclient-ts1.3

We need a test around using a coverage context with a TS query request. I need to see if I wrote this line correctly:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to add a test similar to this one, that adds a context, to make sure it encodes correctly: https://github.com/basho/riak-java-client/blob/merge-dpclient-ts1.3/src/test/java/com/basho/riak/client/core/codec/TermToBinaryCodecTest.java#L133

I think I added everything else in that branch to add the coverage context to the TTB TS Queries though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After merging1.3 branch into this one, @aleksey-suprun can prove this conversion by running (or extending, if needed) our Full Bucket Read Test

mvn clean install
```

Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
</plugins>
</build>
</profile>

<profile>
<id>release</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
* @author Brian Roach <roach at basho dot com>
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakIndex {
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakIndex
{
/**
* @return the index name
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
* @author Brian Roach <roach at basho dot com>
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakKey {

@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakKey
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
* @author Brian Roach <roach at basho dot com>
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakLinks {
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakLinks
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
* @since 2.0
*/

@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakTombstone {

@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakTombstone
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
* @author Brian Roach <roach at basho dot com>
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakUsermeta {
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakUsermeta
{
/**
* Use a lower case key. The riak HTTP API *will* lower case key names.
* @return the key for the user meta item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
* @since 1.4
*/

@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakVClock {

@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface RiakVClock
{
}
9 changes: 6 additions & 3 deletions src/main/java/com/basho/riak/client/api/cap/BasicVClock.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ public class BasicVClock implements VClock
* @param value the vector clock bytes. NOTE: copies the value
* @throws IllegalArgumentException if <code>value</code> is null
*/
public BasicVClock(final byte[] value) {
if (value == null) {
public BasicVClock(final byte[] value)
{
if (value == null)
{
throw new IllegalArgumentException("VClock value cannot be null");
}
this.value = Arrays.copyOf(value, value.length);
Expand All @@ -47,7 +49,8 @@ public BasicVClock(final byte[] value) {
*/
public BasicVClock(String vclock)
{
if (vclock == null) {
if (vclock == null)
{
throw new IllegalArgumentException("VClock value cannot be null");
}
this.value = vclock.getBytes(Charset.forName("UTF-8"));
Expand Down
30 changes: 20 additions & 10 deletions src/main/java/com/basho/riak/client/api/cap/Quorum.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
* @since 2.0
* @see <a href="http://docs.basho.com/riak/latest/dev/advanced/cap-controls/">CAP Controls</a>
*/
public final class Quorum {
public final class Quorum
{

public static final String ONE = "one";
public static final String QUORUM = "quorum";
Expand All @@ -59,7 +60,8 @@ public final class Quorum {
*
* @param i the quorum value
*/
public Quorum(int i) {
public Quorum(int i)
{
if (i < -5 || i == -1)
{
throw new IllegalArgumentException("Illegal value for quorum: " + i);
Expand Down Expand Up @@ -108,7 +110,8 @@ public static Quorum defaultQuorum()
* @return true if this Quorum represents a symbolic value, false if literal
* integer value
*/
public boolean isSymbolic() {
public boolean isSymbolic()
{
switch(i)
{
case -2: // "one"
Expand All @@ -127,7 +130,8 @@ public boolean isSymbolic() {
*
* @return the int value. Will be a negative number for symbolic values.
*/
public int getIntValue() {
public int getIntValue()
{
return i;
}

Expand Down Expand Up @@ -164,25 +168,31 @@ public String toString()
return quorum;
}

@Override public int hashCode() {
@Override public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + i;
return result;
}

@Override public boolean equals(Object obj) {
if (this == obj) {
@Override public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null) {
if (obj == null)
{
return false;
}
if (!(obj instanceof Quorum)) {
if (!(obj instanceof Quorum))
{
return false;
}
Quorum other = (Quorum) obj;
if (i != other.i) {
if (i != other.i)
{
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
* @author Russell Brown <russelldb at basho dot com>
* @since 1.0
*/
public class UnresolvedConflictException extends ExecutionException {
public class UnresolvedConflictException extends ExecutionException
{

/**
* eclipse generated id
Expand All @@ -44,7 +45,8 @@ public class UnresolvedConflictException extends ExecutionException {
* @param siblings
* the list of siblings
*/
public UnresolvedConflictException(Throwable cause, String message, List<? extends Object> siblings) {
public UnresolvedConflictException(Throwable cause, String message, List<? extends Object> siblings)
{
super(message, cause);
this.siblings = siblings;
}
Expand All @@ -57,7 +59,8 @@ public UnresolvedConflictException(Throwable cause, String message, List<? exten
* @param siblings
* the list of siblings
*/
public UnresolvedConflictException(String message, List<? extends Object> siblings) {
public UnresolvedConflictException(String message, List<? extends Object> siblings)
{
super(message);
this.siblings = siblings;
}
Expand All @@ -66,7 +69,8 @@ public UnresolvedConflictException(String message, List<? extends Object> siblin
* Get the siblings that could not be resolved.
* @return the siblings
*/
public List<? extends Object> getSiblings() {
public List<? extends Object> getSiblings()
{
return siblings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ private ListBucketsOperation buildCoreOperation()
* </pre>
* </p>
*/
public static class Response implements Iterable<Namespace> {
public static class Response implements Iterable<Namespace>
{

private final BinaryValue type;
private final List<BinaryValue> buckets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class ResetBucketProperties extends RiakCommand<Void, Namespace>

private final Namespace namespace;

public ResetBucketProperties(Builder builder) {
public ResetBucketProperties(Builder builder)
{
this.namespace = builder.namespace;
}

Expand Down Expand Up @@ -55,14 +56,16 @@ protected Namespace convertQueryInfo(Namespace coreQueryInfo)
return future;
}

private ResetBucketPropsOperation buildCoreOperation() {
private ResetBucketPropsOperation buildCoreOperation()
{
ResetBucketPropsOperation.Builder builder =
new ResetBucketPropsOperation.Builder(namespace);

return builder.build();
}

public static class Builder {
public static class Builder
{

private final Namespace namespace;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,30 @@ protected final RiakFuture<FetchCounter.Response, Location> executeAsync(RiakClu
cluster.execute(buildCoreOperation());

CoreFutureAdapter<FetchCounter.Response, Location, DtFetchOperation.Response, Location> future =
new CoreFutureAdapter<FetchCounter.Response, Location, DtFetchOperation.Response, Location>(coreFuture) {

@Override
protected FetchCounter.Response convertResponse(DtFetchOperation.Response coreResponse)
new CoreFutureAdapter<FetchCounter.Response, Location, DtFetchOperation.Response, Location>(coreFuture)
{
RiakDatatype element = coreResponse.getCrdtElement();

Context context = null;
if (coreResponse.hasContext())
@Override
protected FetchCounter.Response convertResponse(DtFetchOperation.Response coreResponse)
{
context = new Context(coreResponse.getContext());
}

RiakCounter datatype = extractDatatype(element);
RiakDatatype element = coreResponse.getCrdtElement();

return new Response(datatype, context);
}
Context context = null;
if (coreResponse.hasContext())
{
context = new Context(coreResponse.getContext());
}

@Override
protected Location convertQueryInfo(Location coreQueryInfo)
{
return coreQueryInfo;
}
};
RiakCounter datatype = extractDatatype(element);

return new Response(datatype, context);
}

@Override
protected Location convertQueryInfo(Location coreQueryInfo)
{
return coreQueryInfo;
}
};
coreFuture.addListener(future);
return future;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ else if (entry.getKey() == Option.INCLUDE_CONTEXT)
* @author Dave Rusek <drusek at basho dot com>
* @since 2.0
*/
public static final class Option<T> extends RiakOption<T> {
public static final class Option<T> extends RiakOption<T>
{

/**
* Read Quorum.
Expand Down Expand Up @@ -146,7 +147,8 @@ public static final class Option<T> extends RiakOption<T> {
*/
public static final Option<Boolean> INCLUDE_CONTEXT = new Option<Boolean>("INCLUDE_CONTEXT");

public Option(String name) {
public Option(String name)
{
super(name);
}
}
Expand Down
Loading