Edson Marquezani Filho
Edson Marquezani Filho

Reputation: 2706

How can I use YCSD (Yahoo! Cloud System Benchmark) to insert and read custom objects on Mongo

I have just found this tool called YCSD made by Yahoo!, which purpose is to benchmark NoSQL databases. It seems quite complete, but a bit complex as well for a non-Java programmer like me. Nonetheless, it seems worth the effort to learn it.

So, I'm asking for some help on how to do what I need, which is to run a custom test with an specific MongoDB data model. YCSD works out of the box for generic tests, but I want to benchmark my specific scenario, with my actual objects being written and read. When it comes to workloads, I think the default one is ok, because it has already most options needed (for only reads, writes, mixed workload, etc). The problem is actually how to use my real data, instead of dummy data it uses by default.

I understand that I would have to code it in Java, but I don't know where to start it from. I mean, which class, which interface, etc? So, if anyone has ever gone through this before, I would appreciate some guidance on the steps necessary for it.

Thanks.

Upvotes: 0

Views: 180

Answers (1)

Anıl Sevici
Anıl Sevici

Reputation: 224

I am working with YCSB nowadays.I think we should follow the steps in the links below.

https://github.com/brianfrankcooper/YCSB/wiki/Adding-a-Database

The most important step should be to override these methods.

  //Read a single record
  public int read(String table, String key, Set<String> fields, HashMap<String,String> result);

  //Perform a range scan
  public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,String>> result);

  //Update a single record
  public int update(String table, String key, HashMap<String,String> values);

  //Insert a single record
  public int insert(String table, String key, HashMap<String,String> values);

  //Delete a single record
  public int delete(String table, String key);

Upvotes: 2

Related Questions