Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when using workloade for mongodb test #184

Closed
ylouis83 opened this issue Jul 10, 2014 · 8 comments
Closed

error when using workloade for mongodb test #184

ylouis83 opened this issue Jul 10, 2014 · 8 comments

Comments

@ylouis83
Copy link

when I use workloade mode for scan range query:

[root@mysqlstd ycsb-0.1.4]# ./bin/ycsb run mongodb -P workloads/workloade -P large.dat -p mongodb.url=mongodb://127.0.0.1:27017 -p mongodb.database=newdb2 -p mongodb.writeConcern=normal -s >data
Loading workload...
Starting test.
0 sec: 0 operations;
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String

but workloadc is right:

[root@mysqlstd ycsb-0.1.4]# ./bin/ycsb run mongodb -P workloads/workloadc -P large.dat -p mongodb.url=mongodb://127.0.0.1:27017 -p mongodb.database=newdb2 -p mongodb.writeConcern=normal -s >data
Loading workload...
Starting test.
0 sec: 0 operations;
10 sec: 43764 operations; 4358.1 current ops/sec; [READ AverageLatency(us)=217.29]
20 sec: 98842 operations; 5506.15 current ops/sec; [READ AverageLatency(us)=178.14]
20 sec: 100000 operations; 4559.06 current ops/sec; [READ AverageLatency(us)=215.32]

@cmatser
Copy link
Collaborator

cmatser commented Jul 10, 2014

With MongoDB, the read workload will call Mongo's findOne() method to search for the specific key whereas the scan workload will call Mongo's find() method with a "greater than or equal to" on the key. The findOne() method returns the object. The find() method returns a cursor which YCSB will use to iterate over all the results.

I've used YCSB with Mongo. However, I augmented the SCAN code for my purposes and did not use the "greater than or equals" query. I still use the find(), but my query is on a secondary index and is a simple "equals" query.

Sorry, I don't really have an answer for you. Does your debug output include a stacktrace with a line number? That could help pinpoint what the offending line of code is.

Chrisjan

@ylouis83
Copy link
Author

I use this command:

[root@mysqlstd ycsb-0.1.4]# ./bin/ycsb run mongodb -P workloads/workloade
-P large.dat -p mongodb.url=mongodb://127.0.0.1:27017 -p
mongodb.database=newdb2 -p mongodb.writeConcern=normal -p debug=true -s

data.log

and cat data.log

[root@mysqlstd ycsb-0.1.4]# cat data.log
YCSB Client 0.1
Command line: -db com.yahoo.ycsb.db.MongoDbClient -P workloads/workloade -P
large.dat -p mongodb.url=mongodb://127.0.0.1:27017 -p
mongodb.database=newdb2 -p mongodb.writeConcern=normal -p debug=true -s -t
new database url = 127.0.0.1:27017/newdb2
mongo connection created with 127.0.0.1:27017/newdb2
java -cp
/tmp/ycsb-0.1.4/core/lib/core-0.1.4.jar:/tmp/ycsb-0.1.4/hbase-binding/conf:/tmp/ycsb-0.1.4/gemfire-binding/conf:/tmp/ycsb-0.1.4/infinispan-binding/conf:/tmp/ycsb-0.1.4/jdbc-binding/conf:/tmp/ycsb-0.1.4/voldemort-binding/conf:/tmp/ycsb-0.1.4/nosqldb-binding/conf:/tmp/ycsb-0.1.4/mongodb-binding/lib/mongodb-binding-0.1.4.jar
com.yahoo.ycsb.Client -db com.yahoo.ycsb.db.MongoDbClient -P
workloads/workloade -P large.dat -p mongodb.url=mongodb://127.0.0.1:27017
-p mongodb.database=newdb2 -p mongodb.writeConcern=normal -p debug=true -s
-t

2014-07-10 23:45 GMT+08:00 Chrisjan Matser [email protected]:

With MongoDB, the read workload will call Mongo's findOne() method to
search for the specific key whereas the scan workload will call Mongo's
find() method with a "greater than or equal to" on the key. The findOne()
method returns the object. The find() method returns a cursor which YCSB
will use to iterate over all the results.

I've used YCSB with Mongo. However, I augmented the SCAN code for my
purposes and did not use the "greater than or equals" query. I still use
the find(), but my query is on a secondary index and is a simple "equals"
query.

Sorry, I don't really have an answer for you. Does your debug output
include a stacktrace with a line number? That could help pinpoint what the
offending line of code is.

Chrisjan


Reply to this email directly or view it on GitHub
#184 (comment)
.

Phone: +86 18666668061
Email & Gtalk: [email protected]
Personal Blog: http://www.vmcd.org

@ylouis83
Copy link
Author

and got this error output:

java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String

2014-07-10 23:45 GMT+08:00 Chrisjan Matser [email protected]:

With MongoDB, the read workload will call Mongo's findOne() method to
search for the specific key whereas the scan workload will call Mongo's
find() method with a "greater than or equal to" on the key. The findOne()
method returns the object. The find() method returns a cursor which YCSB
will use to iterate over all the results.

I've used YCSB with Mongo. However, I augmented the SCAN code for my
purposes and did not use the "greater than or equals" query. I still use
the find(), but my query is on a secondary index and is a simple "equals"
query.

Sorry, I don't really have an answer for you. Does your debug output
include a stacktrace with a line number? That could help pinpoint what the
offending line of code is.

Chrisjan


Reply to this email directly or view it on GitHub
#184 (comment)
.

Phone: +86 18666668061
Email & Gtalk: [email protected]
Personal Blog: http://www.vmcd.org

@ylouis83
Copy link
Author

Is there any problem with this test mode? and I'm waiting for your reply.

best regards

2014-07-11 9:54 GMT+08:00 louis liu [email protected]:

and got this error output:

java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String
java.lang.ClassCastException: [B cannot be cast to java.lang.String

2014-07-10 23:45 GMT+08:00 Chrisjan Matser [email protected]:

With MongoDB, the read workload will call Mongo's findOne() method to
search for the specific key whereas the scan workload will call Mongo's
find() method with a "greater than or equal to" on the key. The findOne()
method returns the object. The find() method returns a cursor which YCSB
will use to iterate over all the results.

I've used YCSB with Mongo. However, I augmented the SCAN code for my
purposes and did not use the "greater than or equals" query. I still use
the find(), but my query is on a secondary index and is a simple "equals"
query.

Sorry, I don't really have an answer for you. Does your debug output
include a stacktrace with a line number? That could help pinpoint what the
offending line of code is.

Chrisjan


Reply to this email directly or view it on GitHub
#184 (comment)
.

Phone: +86 18666668061
Email & Gtalk: [email protected]
Personal Blog: http://www.vmcd.org

Phone: +86 18666668061
Email & Gtalk: [email protected]
Personal Blog: http://www.vmcd.org

@cindy0912
Copy link

Hi, I have the same problem. Did you solve it? If so, could you please tell me what to do? I'm very appreciate for your help

@ylouis83
Copy link
Author

No I can't solve it and just skip it :)

2014-10-30 22:50 GMT+08:00 cindy0912 [email protected]:

Hi, I have the same problem. Did you solve it? If so, could you please
tell me what to do? I'm very appreciate for your help


Reply to this email directly or view it on GitHub
#184 (comment)
.

Phone: +86 18666668061
Email & Gtalk: [email protected]
Personal Blog: http://www.vmcd.org

@0xl3x1
Copy link
Contributor

0xl3x1 commented Feb 2, 2015

I think this bug is fixed in 87c8e1f (part of the YCSB+T PR) - you could try running the workload again after making that change and recompiling YCSB. Please let me know the outcome if you do.

@busbey
Copy link
Collaborator

busbey commented May 27, 2015

closing as stale. please reopen if you are still having this problem after the change mentioned above.

@busbey busbey closed this as completed May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants