diff options
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/utils_sh.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js index ff8f20a1043..c549278e9e5 100644 --- a/src/mongo/shell/utils_sh.js +++ b/src/mongo/shell/utils_sh.js @@ -94,6 +94,9 @@ sh.help = function() { print( "\tsh.balancerCollectionStatus(fullName) " + "returns wheter the specified collection is balanced or the balancer needs to take more actions on it"); + print( + "\tsh.configureCollectionAutoSplitter(fullName, params) " + + "configure both the default chunk size and the auto-splitting behaviour for a collection"); }; sh.status = function(verbose, configDB) { @@ -553,6 +556,14 @@ sh.balancerCollectionStatus = function(coll) { return sh._adminCommand({balancerCollectionStatus: coll}, true); }; +sh.configureCollectionAutoSplitter = function(coll) { + let cmd = {configureCollectionAutoSplitter: coll}; + if (opts) { + cmd = Object.assign(cmd, opts); + } + return sh._adminCommand(cmd, 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. |