Create a command to produce stats (group/count) stats. This would allow an option for sh.status() to pass in an arg
{mode:"tags"}, versus what I will call
{mode:"chunks"}which is the current default, to group by tag by shard (so you can see the distribution of chunks across shards for each tag) rather than by just by shard.
Here is the proposed command output:
{ "collections" : [ { "ns" : "foo.test1", "shard0000" : { "chunks" : 3, "jumboChunks" : 0, "taggedChunks" : { "a" : 2, "b" : 0, "$default" : 1 } }, "shard0001" : { "chunks" : 9, "jumboChunks" : 0, "taggedChunks" : { "a" : 5, "b" : 3, "$default" : 1 } }, "shard0002" : { "chunks" : 3, "jumboChunks" : 0, "taggedChunks" : { "a" : 0, "b" : 3, "$default" : 0 } } } ], "ok" : 1 }
- is duplicated by
-
SERVER-13985 printShardingStatus uses group/JS
- Closed
- is related to
-
SERVER-16340 Mongo shell javascript sharding admin functions not available in drivers
- Closed