<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 分片分配過濾 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/index-modules-allocation.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/index-modules-allocation.html) 譯文鏈接 : [分片分配過濾](/pages/viewpage.action?pageId=9405600) 貢獻者 : @蘇濤,[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) ### 分片分配過濾 分片分配過濾允許您指定哪些節點托管特定索引的分片。 注意 以下解釋的每個索引分片分配過濾器與[Cluster Level Shard Allocation](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/shards-allocation.html)中介紹的群集范圍分配過濾器同時生效。 可以在啟動時為每個節點分配任意的**metadata** (元數據)屬性。例如,節點可以按如下方式標記一個`rack`?屬性和一個size屬性: ``` bin/elasticsearch -Enode.attr.rack=rack1 -Enode.attr.size=big #1 ``` | 1 | 這些屬性設置也可以在**elasticsearch.yml**配置文件中指定 | 這些**metadata(**元數據)屬性可以與**index.routing.allocation*** 設置一起使用,以將索引分配給特定的節點組。例如,我們可以按如下所示將索引test移動到被標記為big或者`medium的`節點上: ``` PUT test/_settings { "index.routing.allocation.include.size": "big,medium" } ``` 或者,我們可以使用排除規則將索引test從標記為small的節點中移出: ``` PUT test/_settings { "index.routing.allocation.exclude.size": "small" } ``` 可以指定多個規則,在這種情況下必須滿足所有條件。例如,我們可以將索引test移到rack1中的big節點上,具體如下: ``` PUT test/_settings { "index.routing.allocation.include.size": "big", "index.routing.allocation.include.rack": "rack1" } ``` 注意 如果某些條件不能滿足,則分片將不會被移動。 以下設置是動態的,允許活動索引從一組節點移動到另一組節點: **index.routing.allocation.include.{attribute}** ? ? 分配索引到一個節點,節點的{attribute}至少滿足一個逗號分隔的值。 **index.routing.allocation.require.{attribute}** ? ??分配索引到一個節點,節點的{attribute}滿足所有逗號分隔的值。 **index.routing.allocation.exclude.{attribute}** ? ??分配索引到一個節點,節點的{attribute}不滿足任何逗號分隔的值。 還支持這些特殊的屬性: _name ? ? ? ? ? ? ? ? 通過節點名匹配節點 _host_ip ? ? ? ? ? ? ??通過主機IP地址(與主機名關聯的IP)匹配節點 _publish_ip ? ? ? ? ??通過**publish**(發布)IP地址匹配節點 _ip ? ? ? ? ? ? ? ? ? ? ? ?通過_host_ip或_publish_ip進行匹配 _host ? ? ? ? ? ? ? ? ? ?通過主機名匹配節點 可以使用通配符指定所有屬性值,例如: ``` PUT test/_settings { "index.routing.allocation.include._ip": "192.168.2.*" } ```
                  <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>

                              哎呀哎呀视频在线观看