зеркало из https://github.com/Azure/YCSB.git
Merge pull request #720 from jdcryans/master
[kudu] Upgrade client dependency to Kudu 0.8.0
This commit is contained in:
Коммит
4c14276573
|
@ -42,3 +42,15 @@ Then, you can run the workload:
|
|||
```
|
||||
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 {
|
|||
scannerBuilder.setProjectedColumnNames(querySchema);
|
||||
}
|
||||
|
||||
PartialRow lowerBound = schema.newPartialRow();
|
||||
lowerBound.addString(0, startkey);
|
||||
scannerBuilder.lowerBound(lowerBound);
|
||||
KuduPredicate.ComparisonOp comparisonOp;
|
||||
if (recordcount == 1) {
|
||||
PartialRow upperBound = schema.newPartialRow();
|
||||
// Keys are fixed length, just adding something at the end is safe.
|
||||
upperBound.addString(0, startkey.concat(" "));
|
||||
scannerBuilder.exclusiveUpperBound(upperBound);
|
||||
comparisonOp = KuduPredicate.ComparisonOp.EQUAL;
|
||||
} else {
|
||||
comparisonOp = KuduPredicate.ComparisonOp.GREATER_EQUAL;
|
||||
}
|
||||
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();
|
||||
|
||||
while (scanner.hasMoreRows()) {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -79,7 +79,7 @@ LICENSE file.
|
|||
<geode.version>1.0.0-incubating.M1</geode.version>
|
||||
<googlebigtable.version>0.2.3</googlebigtable.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>
|
||||
<!--<mapkeeper.version>1.0</mapkeeper.version>-->
|
||||
<mongodb.version>3.0.3</mongodb.version>
|
||||
|
|
Загрузка…
Ссылка в новой задаче