Skip to content

Instantly share code, notes, and snippets.

@MasterLambaster
Created July 5, 2010 07:34
Show Gist options
  • Save MasterLambaster/464109 to your computer and use it in GitHub Desktop.
Save MasterLambaster/464109 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'mongo'
include Mongo
db = Connection.new.db('map-reduce-test')
coll = db.collection('mrt')
coll.remove
10.times do |n|
ref_id = BSON::ObjectID.new
n.times do
coll.insert({'ref_id'=> ref_id, 'status' => rand(3)})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment