Skip to content

Instantly share code, notes, and snippets.

@krogebry
Created November 6, 2013 01:10
Show Gist options
  • Select an option

  • Save krogebry/7329243 to your computer and use it in GitHub Desktop.

Select an option

Save krogebry/7329243 to your computer and use it in GitHub Desktop.
Sharding!!
ec2-user@i-66972100:~$ mongo 10.0.1.140/cloudrim --eval "sh.status();"
MongoDB shell version: 2.4.6
connecting to: 10.0.1.140/cloudrim
--- Sharding Status ---
sharding version: {
"_id" : 1,
"version" : 3,
"minCompatibleVersion" : 3,
"currentVersion" : 4,
"clusterId" : ObjectId("5278635c043f04f80a134496")
}
shards:
{ "_id" : "shard0000", "host" : "10.0.1.239:27017" }
{ "_id" : "shard0001", "host" : "10.0.1.32:27017" }
{ "_id" : "shard0002", "host" : "10.0.1.31:27017" }
{ "_id" : "shard0003", "host" : "10.0.1.29:27017" }
{ "_id" : "shard0004", "host" : "10.0.1.30:27017" }
{ "_id" : "shard0005", "host" : "10.0.1.79:27017" }
{ "_id" : "shard0006", "host" : "10.0.1.77:27017" }
{ "_id" : "shard0007", "host" : "10.0.1.78:27017" }
{ "_id" : "shard0008", "host" : "10.0.1.75:27017" }
{ "_id" : "shard0009", "host" : "10.0.1.76:27017" }
{ "_id" : "shard0010", "host" : "10.0.1.235:27017" }
{ "_id" : "shard0011", "host" : "10.0.1.236:27017" }
{ "_id" : "shard0012", "host" : "10.0.1.233:27017" }
{ "_id" : "shard0013", "host" : "10.0.1.237:27017" }
{ "_id" : "shard0014", "host" : "10.0.1.234:27017" }
{ "_id" : "shard0015", "host" : "10.0.1.201:27017" }
{ "_id" : "shard0016", "host" : "10.0.1.207:27017" }
{ "_id" : "shard0017", "host" : "10.0.1.63:27017" }
{ "_id" : "shard0018", "host" : "10.0.1.206:27017" }
{ "_id" : "shard0019", "host" : "10.0.1.67:27017" }
{ "_id" : "shard0020", "host" : "10.0.1.66:27017" }
{ "_id" : "shard0021", "host" : "10.0.1.65:27017" }
{ "_id" : "shard0022", "host" : "10.0.1.203:27017" }
{ "_id" : "shard0023", "host" : "10.0.1.202:27017" }
{ "_id" : "shard0024", "host" : "10.0.1.204:27017" }
{ "_id" : "shard0025", "host" : "10.0.1.209:27017" }
{ "_id" : "shard0026", "host" : "10.0.1.64:27017" }
{ "_id" : "shard0027", "host" : "10.0.1.208:27017" }
{ "_id" : "shard0028", "host" : "10.0.1.200:27017" }
{ "_id" : "shard0029", "host" : "10.0.1.205:27017" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "cloudrim", "partitioned" : true, "primary" : "shard0000" }
cloudrim.battle_log
shard key: { "actor_id" : 1 }
chunks:
shard0001 1
shard0002 1
shard0004 1
shard0005 1
shard0006 1
shard0007 1
shard0003 1
shard0000 1
{ "actor_id" : { "$minKey" : 1 } } -->> { "actor_id" : ObjectId("5278650f181f16341e000001") } on : shard0001 Timestamp(2, 0)
{ "actor_id" : ObjectId("5278650f181f16341e000001") } -->> { "actor_id" : ObjectId("52786510181f16341e000015") } on : shard0002 Timestamp(3, 0)
{ "actor_id" : ObjectId("52786510181f16341e000015") } -->> { "actor_id" : ObjectId("52786525181f16341e0000e0") } on : shard0004 Timestamp(5, 0)
{ "actor_id" : ObjectId("52786525181f16341e0000e0") } -->> { "actor_id" : ObjectId("527866d1181f16341e001194") } on : shard0005 Timestamp(6, 0)
{ "actor_id" : ObjectId("527866d1181f16341e001194") } -->> { "actor_id" : ObjectId("52787d0ff612388a42000453") } on : shard0006 Timestamp(7, 0)
{ "actor_id" : ObjectId("52787d0ff612388a42000453") } -->> { "actor_id" : ObjectId("5278859355ca41104e001581") } on : shard0007 Timestamp(8, 0)
{ "actor_id" : ObjectId("5278859355ca41104e001581") } -->> { "actor_id" : ObjectId("5278f4c28a1841f46a036f27") } on : shard0003 Timestamp(8, 1)
{ "actor_id" : ObjectId("5278f4c28a1841f46a036f27") } -->> { "actor_id" : { "$maxKey" : 1 } } on : shard0000 Timestamp(4, 1)
cloudrim.battle_request_log
shard key: { "_id" : 1 }
chunks:
shard0006 1
shard0010 1
shard0013 1
shard0015 1
shard0000 1
shard0014 1
shard0012 1
shard0008 1
shard0004 1
shard0017 1
shard0009 1
shard0011 1
shard0002 1
shard0003 1
shard0005 1
shard0016 1
shard0007 1
shard0001 1
{ "_id" : { "$minKey" : 1 } } -->> { "_id" : ObjectId("52786529fbe1419e0d000001") } on : shard0006 Timestamp(9, 0)
{ "_id" : ObjectId("52786529fbe1419e0d000001") } -->> { "_id" : ObjectId("527865d6fbe1419e0d00145d") } on : shard0010 Timestamp(21, 0)
{ "_id" : ObjectId("527865d6fbe1419e0d00145d") } -->> { "_id" : ObjectId("52786ddb8c5ed6600a0043e3") } on : shard0013 Timestamp(24, 0)
{ "_id" : ObjectId("52786ddb8c5ed6600a0043e3") } -->> { "_id" : ObjectId("52787541c2a532f04f000169") } on : shard0015 Timestamp(26, 0)
{ "_id" : ObjectId("52787541c2a532f04f000169") } -->> { "_id" : ObjectId("52787abae8f5ad3917009c3d") } on : shard0000 Timestamp(21, 1)
{ "_id" : ObjectId("52787abae8f5ad3917009c3d") } -->> { "_id" : ObjectId("52787eff61fcae96440014a6") } on : shard0014 Timestamp(25, 0)
{ "_id" : ObjectId("52787eff61fcae96440014a6") } -->> { "_id" : ObjectId("52788149b18557974a0010ca") } on : shard0012 Timestamp(23, 0)
{ "_id" : ObjectId("52788149b18557974a0010ca") } -->> { "_id" : ObjectId("5278848b72fb89a009000005") } on : shard0008 Timestamp(11, 0)
{ "_id" : ObjectId("5278848b72fb89a009000005") } -->> { "_id" : ObjectId("527930d6807807e06802279c") } on : shard0004 Timestamp(25, 1)
{ "_id" : ObjectId("527930d6807807e06802279c") } -->> { "_id" : ObjectId("527948c9e2778a9e0a007fe7") } on : shard0017 Timestamp(28, 0)
{ "_id" : ObjectId("527948c9e2778a9e0a007fe7") } -->> { "_id" : ObjectId("527956dea46c7f243500c7af") } on : shard0009 Timestamp(28, 1)
{ "_id" : ObjectId("527956dea46c7f243500c7af") } -->> { "_id" : ObjectId("52796111e1e19a2335019b08") } on : shard0011 Timestamp(22, 0)
{ "_id" : ObjectId("52796111e1e19a2335019b08") } -->> { "_id" : ObjectId("527968923ba5d4174d0151cd") } on : shard0002 Timestamp(23, 1)
{ "_id" : ObjectId("527968923ba5d4174d0151cd") } -->> { "_id" : ObjectId("52796fb638e7d8750a000005") } on : shard0003 Timestamp(24, 1)
{ "_id" : ObjectId("52796fb638e7d8750a000005") } -->> { "_id" : ObjectId("5279751f089c8f655f00a35d") } on : shard0005 Timestamp(26, 1)
{ "_id" : ObjectId("5279751f089c8f655f00a35d") } -->> { "_id" : ObjectId("527978598181d0430a0108c9") } on : shard0016 Timestamp(27, 0)
{ "_id" : ObjectId("527978598181d0430a0108c9") } -->> { "_id" : ObjectId("527982a38181d0430a0270ef") } on : shard0007 Timestamp(27, 1)
{ "_id" : ObjectId("527982a38181d0430a0270ef") } -->> { "_id" : { "$maxKey" : 1 } } on : shard0001 Timestamp(22, 1)
cloudrim.jaegers
shard key: { "level" : 1 }
chunks:
shard0007 1
shard0009 1
shard0008 1
shard0015 1
shard0006 1
shard0011 1
shard0001 1
shard0012 1
shard0002 1
shard0005 1
shard0013 1
shard0010 1
shard0003 1
shard0014 1
shard0004 1
shard0000 1
{ "level" : { "$minKey" : 1 } } -->> { "level" : 1 } on : shard0007 Timestamp(12, 0)
{ "level" : 1 } -->> { "level" : 48 } on : shard0009 Timestamp(14, 0)
{ "level" : 48 } -->> { "level" : 99 } on : shard0008 Timestamp(13, 0)
{ "level" : 99 } -->> { "level" : 1156 } on : shard0015 Timestamp(23, 0)
{ "level" : 1156 } -->> { "level" : 2226 } on : shard0006 Timestamp(11, 0)
{ "level" : 2226 } -->> { "level" : 2868 } on : shard0011 Timestamp(19, 0)
{ "level" : 2868 } -->> { "level" : 3724 } on : shard0001 Timestamp(19, 1)
{ "level" : 3724 } -->> { "level" : 4366 } on : shard0012 Timestamp(20, 0)
{ "level" : 4366 } -->> { "level" : 5210 } on : shard0002 Timestamp(20, 1)
{ "level" : 5210 } -->> { "level" : 5786 } on : shard0005 Timestamp(23, 1)
{ "level" : 5786 } -->> { "level" : 6698 } on : shard0013 Timestamp(21, 0)
{ "level" : 6698 } -->> { "level" : 7342 } on : shard0010 Timestamp(18, 0)
{ "level" : 7342 } -->> { "level" : 8189 } on : shard0003 Timestamp(21, 1)
{ "level" : 8189 } -->> { "level" : 8824 } on : shard0014 Timestamp(22, 0)
{ "level" : 8824 } -->> { "level" : 9999 } on : shard0004 Timestamp(22, 1)
{ "level" : 9999 } -->> { "level" : { "$maxKey" : 1 } } on : shard0000 Timestamp(18, 1)
cloudrim.kiajus
shard key: { "level" : 1 }
chunks:
shard0000 1
{ "level" : { "$minKey" : 1 } } -->> { "level" : { "$maxKey" : 1 } } on : shard0000 Timestamp(1, 0)
cloudrim.users
shard key: { "name" : 1 }
chunks:
shard0000 1
{ "name" : { "$minKey" : 1 } } -->> { "name" : { "$maxKey" : 1 } } on : shard0000 Timestamp(1, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment