<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Cluster Allocation Explain API 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html) 譯文鏈接 : [http://www.apache.wiki/display/Elasticsearch/Cluster+Allocation+Explain+API](http://www.apache.wiki/display/Elasticsearch/Cluster+Allocation+Explain+API) 貢獻者 : [那伊抹微笑](/display/~wangyangting) **cluster allocation explanation API** 的目的是幫助回答這個問題 “為什么這個分片沒有被分配”。為了說明分片的分配(未分配狀態),發出一個這樣的請求 :? ``` $ curl -XGET 'http://localhost:9200/_cluster/allocation/explain' -d'{ "index": "myindex", "shard": 0, "primary": false }' ``` 指定您希望查看的說明的 **index** 和 **shard** 的 **id**,和 **primary** 標記一樣來指出是否 **explain** 一個主或者副本分片。 該響應如下 :? ``` { "shard" : { "index" : "myindex", "index_uuid" : "KnW0-zELRs6PK84l0r38ZA", "id" : 0, "primary" : false }, "assigned" : false, ① "shard_state_fetch_pending": false, ② "unassigned_info" : { "reason" : "INDEX_CREATED", ③ "at" : "2016-03-22T20:04:23.620Z" }, "allocation_delay_ms" : 0, ④ "remaining_delay_ms" : 0, ⑤ "nodes" : { "V-Spi0AyRZ6ZvKbaI3691w" : { "node_name" : "H5dfFeA", "node_attributes" : { ⑥ "bar" : "baz" }, "store" : { "shard_copy" : "NONE" ⑦ }, "final_decision" : "NO", ⑧ "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", "weight" : 0.06666675, ⑨ "decisions" : [ { ⑩ "decider" : "filter", "decision" : "NO", "explanation" : "node does not match index include filters [foo:\"bar\"]" } ] }, "Qc6VL8c5RWaw1qXZ0Rg57g" : { "node_name" : "bGG90GE", "node_attributes" : { "bar" : "baz", "foo" : "bar" }, "store" : { "shard_copy" : "AVAILABLE" }, "final_decision" : "NO", "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", "weight" : -1.3833332, "decisions" : [ { "decider" : "same_shard", "decision" : "NO", "explanation" : "the shard cannot be allocated on the same node id [Qc6VL8c5RWaw1qXZ0Rg57g] on which it already exists" } ] }, "PzdyMZGXQdGhqTJHF_hGgA" : { "node_name" : "DKDM97B", "node_attributes" : { }, "store" : { "shard_copy" : "NONE" }, "final_decision" : "NO", "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", "weight" : 2.3166666, "decisions" : [ { "decider" : "filter", "decision" : "NO", "explanation" : "node does not match index include filters [foo:\"bar\"]" } ] } } } ``` | 編號 | 描述 | | --- | --- | | [![](https://img.kancloud.cn/89/2e/892e2d6105d4361c3e81583c8e019d23_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-1) | Whether the shard is assigned or unassigned | | [![](https://img.kancloud.cn/50/46/50466ab92768bfee2306a5da100c7496_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-2) | Whether information about the shard is still being fetched | | [![](https://img.kancloud.cn/59/09/59090687855ebb833c063fe09e622609_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-3) | Reason for the shard originally becoming unassigned | | [![](https://img.kancloud.cn/72/66/726692319400896ddea1bf795251948a_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-4) | Configured delay before the shard can be allocated | | [![](https://img.kancloud.cn/34/27/3427b2f40fd77851efa479c41f613dfd_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-5) | Remaining delay before the shard can be allocated | | [![](https://img.kancloud.cn/91/51/9151933bf595eccfab29194d2e61e237_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-6) | User-added attributes the node has | | [![](https://img.kancloud.cn/62/c6/62c60e7351882441f5bffcc97211a497_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-7) | The shard copy information for this node and error (if applicable) | | [![](https://img.kancloud.cn/5d/dc/5ddcf6f1d2055b519167ec480be16f8d_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-8) | Final decision and explanation of whether the shard can be allocated to this node | | [![](https://img.kancloud.cn/8d/56/8d56c08d22dba1c7728b900af8fdea72_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-9) | Weight for how much the allocator would like to allocate the shard to this node | | [![](https://img.kancloud.cn/ab/f6/abf6e56a252130a784040f2c9d38cf94_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO138-10) | List of node decisions factoring into final decision about the shard | 對于一個已經分配的分片來說,輸出與下面相似 :? ``` { "shard" : { "index" : "only-foo", "index_uuid" : "KnW0-zELRs6PK84l0r38ZA", "id" : 0, "primary" : true }, "assigned" : true, "assigned_node_id" : "Qc6VL8c5RWaw1qXZ0Rg57g", ① "shard_state_fetch_pending": false, "allocation_delay_ms" : 0, "remaining_delay_ms" : 0, "nodes" : { "V-Spi0AyRZ6ZvKbaI3691w" : { "node_name" : "bGG90GE", "node_attributes" : { "bar" : "baz" }, "store" : { "shard_copy" : "NONE" }, "final_decision" : "NO", "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", "weight" : 1.4499999, "decisions" : [ { "decider" : "filter", "decision" : "NO", "explanation" : "node does not match index include filters [foo:\"bar\"]" } ] }, "Qc6VL8c5RWaw1qXZ0Rg57g" : { "node_name" : "I8hydUG", "node_attributes" : { "bar" : "baz", "foo" : "bar" }, "store" : { "shard_copy" : "AVAILABLE" }, "final_decision" : "ALREADY_ASSIGNED", ② "final_explanation" : "the shard is already assigned to this node", "weight" : 0.0, "decisions" : [ { "decider" : "same_shard", "decision" : "NO", "explanation" : "the shard cannot be allocated on the same node id [Qc6VL8c5RWaw1qXZ0Rg57g] on which it already exists" } ] }, "PzdyMZGXQdGhqTJHF_hGgA" : { "node_name" : "H5dfFeA", "node_attributes" : { }, "store" : { "shard_copy" : "NONE" }, "final_decision" : "NO", "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", "weight" : 3.6999998, "decisions" : [ { "decider" : "filter", "decision" : "NO", "explanation" : "node does not match index include filters [foo:\"bar\"]" } ] } } } ``` | 編號 | 描述 | | --- | --- | | [![](https://img.kancloud.cn/89/2e/892e2d6105d4361c3e81583c8e019d23_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO139-1) | Node the shard is currently assigned to | | [![](https://img.kancloud.cn/50/46/50466ab92768bfee2306a5da100c7496_14x15.jpg)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster-allocation-explain.html#CO139-2) | The decision is "ALREADY_ASSIGNED" because the shard is currently assigned to this node | 您也可以讓 **Elasticsearch explain** 第一個未分配分片的分配情況,它可以通過發送一個空的 **body** 來找到,例如 :? ``` $ curl -XGET 'http://localhost:9200/_cluster/allocation/explain' ``` 如果您想要去包含所有的那些我們考慮到的最終的決策的決定,該 _**`include_yes_decisions`?**_參數將返回所有的決策 :? ``` $ curl -XGET 'http://localhost:9200/_cluster/allocation/explain?include_yes_decisions=true' ``` 此外,通過設置 _**`include_disk_info`**_參數為 _**true**_,您可以返回通過集群信息服務返回收集到的信息,包括硬盤使用和分配大小。 ``` $ curl -XGET 'http://localhost:9200/_cluster/allocation/explain?include_disk_info=true' ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看