发布于 2015-09-14 14:51:26 | 158 次阅读 | 评论: 0 | 来源: 网络整理
2.2 新版功能.
参数: |
|
---|
sh.addShardTag() associates a shard with a tag or identifier. MongoDB uses these identifiers to direct chunks that fall within a tagged range to specific shards.
sh.addTagRange() associates chunk ranges with tag ranges.
Always issue sh.addShardTag() when connected to a mongos instance.
Example
The following example adds three tags, NYC, LAX, and NRT, to three shards:
sh.addShardTag("shard0000", "NYC")
sh.addShardTag("shard0001", "LAX")
sh.addShardTag("shard0002", "NRT")
也可以参考