Help us understand the problem. What is going on with this article?

mongodbでシャーディングをした際にでるメッセージへ対応

More than 5 years have passed since last update.

概要

mongodbでシャーディング環境で大量にデータを入力した際に、シャーディング状況が詳細にでない場合への対応

mongos> sh.status();
--- Sharding Status --- 
  sharding version: {
    "_id" : 1,
    "version" : 3,
    "minCompatibleVersion" : 3,
    "currentVersion" : 4,
    "clusterId" : ObjectId("53344f8fb902e42d70c8f23f")
}
  shards:
    {  "_id" : "shard0000",  "host" : "localhost:30000" }
    {  "_id" : "shard0001",  "host" : "localhost:30001" }
    {  "_id" : "shard0002",  "host" : "localhost:30002" }
  databases:
    {  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
    {  "_id" : "logdb",  "partitioned" : true,  "primary" : "shard0000" }
        logdb.logs
            shard key: { "uid" : 1 }
            chunks:
                shard0000   17
                shard0002   18
                shard0001   17
            too many chunks to print, use verbose if you want to force print
    {  "_id" : "logs",  "partitioned" : false,  "primary" : "shard0002" }

出力を有効にするには以下のコマンドを実行する。

sh.status(true)



db.printShardingStatus( true )

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away