Hi!
I've installed YCSB and MongoDB 1.8.1 (and later on 1.4.2), and tried to execute a workload according to the steps in the "Running a Workload" wiki page, but couldn't get it working.
I successfully tested YCSB with Cassandra, so I'm guessing the problem must be related to the MongoDB driver for YCSB.
Here are my steps:
- Install and run MongoDB 1.8.1 on localhost (later on I also tried with version 1.4.2, but got the same results)
- Setup YCSB according the Getting Started wiki
- Attempt to execute workload "workloada" using:
$ java com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.db.MongoDbClient -P workload/workloada -P mongo.opt
where the mongo.opt contains:
recordcount=1000000
mongodb.database=mytestdb
mongodb.url=mongodb://localhost:27017
The output I get (truncated):
YCSB Client 0.1
Command line: -load -db com.yahoo.ycsb.db.MongoDbClient -P workloads/workloada -P mongo.opt
Loading workload...
Starting test.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/roi.avidan/YCSB/db/mongodb/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/roi.avidan/YCSB/db/mongodb/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2 [Thread-1] ERROR com.yahoo.ycsb.db.MongoDbClient - java.lang.IllegalArgumentException: invalid ObjectId [user1268118805]
java.lang.IllegalArgumentException: invalid ObjectId [user1268118805]
at org.bson.types.ObjectId.(ObjectId.java:130)
at org.bson.types.ObjectId.(ObjectId.java:124)
at com.yahoo.ycsb.db.MongoDbClient.insert(Unknown Source)
at com.yahoo.ycsb.DBWrapper.insert(Unknown Source)
at com.yahoo.ycsb.workloads.CoreWorkload.doInsert(Unknown Source)
at com.yahoo.ycsb.ClientThread.run(Unknown Source)
[OVERALL], RunTime(ms), 430.0
[OVERALL], Throughput(ops/sec), 2325581.395348837
[INSERT], Operations, 1
[INSERT], AverageLatency(ms), 15.0
[INSERT], MinLatency(ms), 15
[INSERT], MaxLatency(ms), 15
[INSERT], 95thPercentileLatency(ms), 15
[INSERT], 99thPercentileLatency(ms), 15
[INSERT], Return=1, 1
[INSERT], 0, 0
[INSERT], 1, 0
[INSERT], 2, 0
[INSERT], 3, 0
[INSERT], 4, 0
[INSERT], 5, 0
[INSERT], 6, 0
[INSERT], 7, 0
[INSERT], 8, 0
[INSERT], 9, 0
[INSERT], 10, 0
[INSERT], 11, 0
[INSERT], 12, 0
[INSERT], 13, 0
[INSERT], 14, 0
[INSERT], 15, 1
[INSERT], 16, 0
[INSERT], 17, 0
[INSERT], 18, 0
[INSERT], 19, 0
[INSERT], 20, 0
[INSERT], 21, 0
[INSERT], 22, 0
[INSERT], 23, 0
[INSERT], 24, 0
[INSERT], 25, 0
[INSERT], 26, 0
[INSERT], 27, 0
[INSERT], 28, 0
[INSERT], 29, 0
[INSERT], 30, 0
What am I doing wrong?
Thanks in advance,
Roi