Skip to content
Snippets Groups Projects
Commit 4c142765 authored by Sean Busbey's avatar Sean Busbey
Browse files

Merge pull request #720 from jdcryans/master

[kudu] Upgrade client dependency to Kudu 0.8.0
parents 81f6f146 a9e0f49f
No related branches found
No related tags found
No related merge requests found
...@@ -42,3 +42,15 @@ Then, you can run the workload: ...@@ -42,3 +42,15 @@ Then, you can run the workload:
``` ```
bin/ycsb run kudu -P workloads/workloada bin/ycsb run kudu -P workloads/workloada
``` ```
## Using a previous client version
If you wish to use a different Kudu client version than the one shipped with YCSB, you can specify on the
command line with `-Dkudu.version=x`. For example:
```
mvn -pl com.yahoo.ycsb:kudu-binding -am package -DskipTests -Dkudu.version=0.7.1
```
Note that prior to 1.0, Kudu doesn't guarantee wire or API compability between versions and only the latest
one is officially supported.
...@@ -233,17 +233,20 @@ public class KuduYCSBClient extends com.yahoo.ycsb.DB { ...@@ -233,17 +233,20 @@ public class KuduYCSBClient extends com.yahoo.ycsb.DB {
scannerBuilder.setProjectedColumnNames(querySchema); scannerBuilder.setProjectedColumnNames(querySchema);
} }
PartialRow lowerBound = schema.newPartialRow(); KuduPredicate.ComparisonOp comparisonOp;
lowerBound.addString(0, startkey);
scannerBuilder.lowerBound(lowerBound);
if (recordcount == 1) { if (recordcount == 1) {
PartialRow upperBound = schema.newPartialRow(); comparisonOp = KuduPredicate.ComparisonOp.EQUAL;
// Keys are fixed length, just adding something at the end is safe. } else {
upperBound.addString(0, startkey.concat(" ")); comparisonOp = KuduPredicate.ComparisonOp.GREATER_EQUAL;
scannerBuilder.exclusiveUpperBound(upperBound);
} }
KuduPredicate keyPredicate = KuduPredicate.newComparisonPredicate(
schema.getColumnByIndex(0),
comparisonOp,
startkey);
KuduScanner scanner = scannerBuilder.limit(recordcount) // currently noop KuduScanner scanner = scannerBuilder
.addPredicate(keyPredicate)
.limit(recordcount) // currently noop
.build(); .build();
while (scanner.hasMoreRows()) { while (scanner.hasMoreRows()) {
......
...@@ -79,7 +79,7 @@ LICENSE file. ...@@ -79,7 +79,7 @@ LICENSE file.
<geode.version>1.0.0-incubating.M1</geode.version> <geode.version>1.0.0-incubating.M1</geode.version>
<googlebigtable.version>0.2.3</googlebigtable.version> <googlebigtable.version>0.2.3</googlebigtable.version>
<infinispan.version>7.2.2.Final</infinispan.version> <infinispan.version>7.2.2.Final</infinispan.version>
<kudu.version>0.6.0</kudu.version> <kudu.version>0.8.0</kudu.version>
<openjpa.jdbc.version>2.1.1</openjpa.jdbc.version> <openjpa.jdbc.version>2.1.1</openjpa.jdbc.version>
<!--<mapkeeper.version>1.0</mapkeeper.version>--> <!--<mapkeeper.version>1.0</mapkeeper.version>-->
<mongodb.version>3.0.3</mongodb.version> <mongodb.version>3.0.3</mongodb.version>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment