This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| ... | |
| "clusterId" : ObjectId("53616554992f1bbce576f9fd") | |
| } | |
| shards: | |
| { "_id" : "shard0000", "host" : "Server1:27017", "tags" : [ "current" ] } | |
| { "_id" : "shard0001", "host" : "Server2:27017", "tags" : [ "tier-2" ] } | |
| { "_id" : "shard0002", "host" : "Server3:27017", "tags" : [ "tier-2" ] } | |
| databases: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.addShardTag('shard0000', 'current') | |
| sh.addShardTag('shard0001', 'tier-2') | |
| sh.addShardTag('shard0002', 'tier-2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| sharding version: { | |
| "_id" : 1, | |
| "version" : 3, | |
| "minCompatibleVersion" : 3, | |
| "currentVersion" : 4, | |
| "clusterId" : ObjectId("53616554992f1bbce576f9fd") | |
| } | |
| shards: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_id" : ObjectId("4f16fc97d1e2d32371003f87"), | |
| "body" : "i say el tiempo\n\n\nTo: Timothy Blanchard/HOU/EES@EES, Bryan Hull/HOU/ECT@ECT, Luis \nMena/NA/Enron@Enron, Lisa Gillette/HOU/ECT@ECT, Susan M Scott/HOU/ECT@ECT, \nShanna Husser/HOU/EES@EES, Eric Bass/HOU/ECT@ECT,[email protected]\ncc: \nSubject: \n\ndoes everyone want to meet at tortucas on kirby south of 59 or el tiempo(no \ntequilla shots) or cabos downtown tonight. let's meet around 6-6:30.\n\n", | |
| "date" : ISODate("2001-03-01T09:55:00Z"), | |
| "filename" : "1107.", | |
| "headers" : { | |
| "Content-Transfer-Encoding" : "7bit", | |
| "Content-Type" : "text/plain; charset=us-ascii", | |
| "From" : "[email protected]", | |
| "Message-ID" : "<25125852.1075854773620.JavaMail.evans@thyme>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.setBalancerState(true) | |
| sh.status() | |
| sh.status() | |
| --- Sharding Status --- | |
| sharding version: { | |
| "_id" : 1, | |
| "version" : 3, | |
| "minCompatibleVersion" : 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| configdb.tags.update({tag:"tier 2"},{$set:{'max.date':ISODate("2001-07-31")}}) | |
| configdb.tags.update({tag:"recent"},{$set:{'min.date':ISODate("2001-07-31")}}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.setBalancerState(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| sharding version: { | |
| "_id" : 1, | |
| "version" : 3, | |
| "minCompatibleVersion" : 3, | |
| "currentVersion" : 4, | |
| "clusterId" : ObjectId("5314f1487abd6cb2803696d6") | |
| } | |
| shards: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.splitAt('enron.messages',{date:ISODate("2001-08-01")}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| configdb = db.getSiblingDB("config") | |
| configdb.tags.find().pretty() | |
| { | |
| "_id" : { | |
| "ns" : "enron.messages", | |
| "min" : { | |
| "date" : { "$minKey" : 1 } | |
| } | |
| }, |