Skip to content

Commit c4ac200

Browse files
authored
Merge pull request #59 from steveren/DOCSP-12577
[mongosh] sharding methods
2 parents 0533411 + ddbf271 commit c4ac200

File tree

1 file changed

+60
-3
lines changed

1 file changed

+60
-3
lines changed

source/reference/methods.txt

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ Administration Methods
3333

3434
- Runs a command against the ``admin`` database.
3535

36-
3736
* - :method:`db.currentOp()`
3837

3938
- Reports the current in-progress operations.
4039

41-
4240
* - :method:`db.killOp()`
4341

4442
- Terminates a specified operation.
@@ -269,6 +267,15 @@ Collection Methods
269267

270268
.. getIndexSpecs
271269

270+
* - :method:`db.collection.getShardDistribution()`
271+
272+
- Prints the data distribution statistics for a sharded collection.
273+
274+
* - :method:`db.collection.getShardVersion()`
275+
276+
- Provides a wrapper for the database command :manual:`getShardVersion
277+
</reference/command/getShardVersion/>`.
278+
272279
* - :method:`db.collection.insert()`
273280

274281
- Creates a new document in a collection.
@@ -307,7 +314,7 @@ Collection Methods
307314

308315
* - :method:`db.collection.save()`
309316

310-
- Provides a wrapper around an :method:`~db.collection.insert()`
317+
- Provides a wrapper around :method:`~db.collection.insert()`
311318
and :method:`~db.collection.update()` to insert new documents.
312319

313320
* - :method:`db.collection.stats()`
@@ -617,6 +624,11 @@ Database Methods
617624

618625
- Ends an authenticated session.
619626

627+
* - :method:`db.printShardingStatus()`
628+
629+
- Prints a formatted report of the sharding configuration and the
630+
information regarding existing chunks in a sharded cluster.
631+
620632
* - :method:`db.runCommand()`
621633

622634
- Runs a :manual:`database command </reference/command>`.
@@ -762,6 +774,51 @@ Server Status Methods
762774

763775
- Returns the version of the :binary:`~mongod` instance.
764776

777+
Sharding Methods
778+
----------------
779+
780+
.. list-table::
781+
:widths: 30 70
782+
:header-rows: 1
783+
784+
* - Method
785+
786+
- Description
787+
788+
* - :method:`sh.addShard()`
789+
790+
- Adds a shard to a sharded cluster.
791+
792+
* - :method:`sh.addShardTag()`
793+
794+
- Aliases to :method:`sh.addShardToZone()`.
795+
796+
* - :method:`sh.addShardToZone()`
797+
798+
- Associates a shard with a zone. Supports configuring zones in sharded
799+
clusters.
800+
801+
* - :method:`sh.addTagRange()`
802+
803+
- Aliases to :method:`sh.updateZoneKeyRange()`.
804+
805+
* - :method:`sh.enableSharding()`
806+
807+
- Enables sharding on a specific database.
808+
809+
* - :method:`sh.shardCollection()`
810+
811+
- Enables sharding for a collection.
812+
813+
* - :method:`sh.status()`
814+
815+
- Reports on the status of a sharded cluster.
816+
817+
* - :method:`sh.updateZoneKeyRange()`
818+
819+
- Associates a range of shard keys with a zone. Supports configuring
820+
zones in sharded clusters.
821+
765822
User Management Methods
766823
-----------------------
767824

0 commit comments

Comments
 (0)