зеркало из https://github.com/Azure/YCSB.git
Merge pull request #773 from couchbaselabs/master
[couchbase2] Update Java SDK version, query for workloade
This commit is contained in:
Коммит
20101dddd0
|
@ -65,7 +65,14 @@ For `workloade` and the default `readallfields=true` we recommend creating the f
|
|||
Server 4.5 or later with the "Memory Optimized Index" setting on the bucket.
|
||||
|
||||
```
|
||||
CREATE INDEX wle_idx ON `bucketname`(meta().id);
|
||||
CREATE PRIMARY INDEX ON `bucketname`;
|
||||
```
|
||||
|
||||
Couchbase Server prior to 4.5 may need a slightly different index to deliver the best performance. In those releases
|
||||
additional covering information may be added to the index with this form.
|
||||
|
||||
```
|
||||
-CREATE INDEX wle_idx ON `bucketname`(meta().id);
|
||||
```
|
||||
|
||||
For other workloads, different index setups might be even more performant.
|
||||
|
|
|
@ -149,7 +149,8 @@ public class Couchbase2Client extends DB {
|
|||
boost = Integer.parseInt(props.getProperty("couchbase.boost", "3"));
|
||||
networkMetricsInterval = Integer.parseInt(props.getProperty("couchbase.networkMetricsInterval", "0"));
|
||||
runtimeMetricsInterval = Integer.parseInt(props.getProperty("couchbase.runtimeMetricsInterval", "0"));
|
||||
scanAllQuery = "SELECT meta().id as id FROM `" + bucketName + "` WHERE meta().id >= '$1' LIMIT $2";
|
||||
scanAllQuery = "SELECT RAW meta().id FROM `" + bucketName +
|
||||
"` WHERE meta().id >= '$1' ORDER BY meta().id LIMIT $2";
|
||||
|
||||
try {
|
||||
synchronized (INIT_COORDINATOR) {
|
||||
|
@ -632,11 +633,7 @@ public class Couchbase2Client extends DB {
|
|||
.flatMap(new Func1<AsyncN1qlQueryRow, Observable<RawJsonDocument>>() {
|
||||
@Override
|
||||
public Observable<RawJsonDocument> call(AsyncN1qlQueryRow row) {
|
||||
String id = new String(row.byteValue());
|
||||
return bucket.async().get(
|
||||
id.substring(id.indexOf(table + SEPARATOR), id.lastIndexOf('"')),
|
||||
RawJsonDocument.class
|
||||
);
|
||||
return bucket.async().get(new String(row.byteValue()), RawJsonDocument.class);
|
||||
}
|
||||
})
|
||||
.map(new Func1<RawJsonDocument, HashMap<String, ByteIterator>>() {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -92,7 +92,7 @@ LICENSE file.
|
|||
<thrift.version>0.8.0</thrift.version>
|
||||
<hypertable.version>0.9.5.6</hypertable.version>
|
||||
<couchbase.version>1.4.10</couchbase.version>
|
||||
<couchbase2.version>2.2.6</couchbase2.version>
|
||||
<couchbase2.version>2.3.1</couchbase2.version>
|
||||
<tarantool.version>1.6.5</tarantool.version>
|
||||
<riak.version>2.0.5</riak.version>
|
||||
<aerospike.version>3.1.2</aerospike.version>
|
||||
|
|
Загрузка…
Ссылка в новой задаче