summaryrefslogtreecommitdiff
path: root/src/mongo/shell/utils_sh.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/utils_sh.js')
-rw-r--r--src/mongo/shell/utils_sh.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js
index 07c3b5a14b1..d60fe31c7c2 100644
--- a/src/mongo/shell/utils_sh.js
+++ b/src/mongo/shell/utils_sh.js
@@ -91,6 +91,9 @@ sh.help = function() {
print("\tsh.disableAutoSplit() disable autoSplit on one collection");
print("\tsh.enableAutoSplit() re-enable autoSplit on one collection");
print("\tsh.getShouldAutoSplit() returns whether autosplit is enabled");
+ print(
+ "\tsh.balancerCollectionStatus(fullName) " +
+ "returns wheter the specified collection is balanced or the balancer needs to take more actions on it");
};
sh.status = function(verbose, configDB) {
@@ -543,6 +546,10 @@ sh._shardingStatusStr = function(indent, s) {
return indentStr(indent, s) + "\n";
};
+sh.balancerCollectionStatus = function(coll) {
+ return sh._adminCommand({balancerCollectionStatus: coll}, true);
+};
+
function printShardingStatus(configDB, verbose) {
// configDB is a DB object that contains the sharding metadata of interest.
// Defaults to the db named "config" on the current connection.
@@ -827,4 +834,4 @@ function printShardingSizes(configDB) {
});
print(raw);
-}
+} \ No newline at end of file