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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Task Management API ## Current Tasks Information(當前任務信息) **task management API**?可以獲取關于集群中一個或多個節點正在執行中的任務的信息。 | `curl -XGET?``'localhost:9200/_tasks ?pretty'``①` `curl -XGET?``'localhost:9200/_tasks?nodes=nodeId1,nodeId2 &pretty'``②` `curl -XGET?``'localhost:9200/_tasks?nodes=nodeId1,nodeId2&actions=cluster:* &pretty'``③` | | 編號 | 描述 | | --- | --- | | [![](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/images/icons/callouts/1.png)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/tasks.html#CO135-1) | Retrieves all tasks currently running on all nodes in the cluster. | | [![](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/images/icons/callouts/2.png)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/tasks.html#CO135-2) | Retrieves all tasks running on nodes?`nodeId1`?and?`nodeId2`. See?[the section called “Node specification](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cluster.html#cluster-nodes "Node specificationedit")[edit](https://github.com/elastic/elasticsearch/edit/5.0/docs/reference/cluster.asciidoc "Edit this page on GitHub")” for more info about how to select individual nodes. | | [![](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/images/icons/callouts/3.png)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/tasks.html#CO135-3) | Retrieves all cluster-related tasks running on nodes?`nodeId1`?and?`nodeId2`. | 返回結果看起來如下 :? | `{` `"nodes"`?`: {` `"oTUltX4IQMOUUVeiohTt8A"`?`: {` `"name"`?`:?``"H5dfFeA"``,` `"transport_address"`?`:?``"127.0.0.1:9300"``,` `"host"`?`:?``"127.0.0.1"``,` `"ip"`?`:?``"127.0.0.1:9300"``,` `"tasks"`?`: {` `"oTUltX4IQMOUUVeiohTt8A:124"`?`: {` `"node"`?`:?``"oTUltX4IQMOUUVeiohTt8A"``,` `"id"`?`: 124,` `"type"`?`:?``"direct"``,` `"action"`?`:?``"cluster:monitor/tasks/lists[n]"``,` `"start_time_in_millis"`?`: 1458585884904,` `"running_time_in_nanos"`?`: 47402,` `"cancellable"`?`:?``false``,` `"parent_task_id"`?`:?``"oTUltX4IQMOUUVeiohTt8A:123"` `},` `"oTUltX4IQMOUUVeiohTt8A:123"`?`: {` `"node"`?`:?``"oTUltX4IQMOUUVeiohTt8A"``,` `"id"`?`: 123,` `"type"`?`:?``"transport"``,` `"action"`?`:?``"cluster:monitor/tasks/lists"``,` `"start_time_in_millis"`?`: 1458585884904,` `"running_time_in_nanos"`?`: 236042,` `"cancellable"`?`:?``false` `}` `}` `}` `}` `}` | 也可以獲取指定任務的信息 :? | `curl -XGET?``'localhost:9200/_tasks/task_id:1 ?pretty'` | | [![](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/images/icons/callouts/1.png)](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/tasks.html#CO136-1) | This will return a 404 if the task isn’t found. | 或者獲取任務所有子任務的信息 :? | `curl -XGET?``'localhost:9200/_tasks?parent_task_id=parentTaskId:1 &pretty'` | 如果父任務不存在也不會返回 404 錯誤。 該任務?**API**?也可用于等待一個指定的任務完成。在?**id**?為**oTUltX4IQMOUUVeiohTt8A**?的任務完成之前,下面的調用將鎖住?**10**?秒。 | `curl -XGET?``'localhost:9200/_tasks/oTUltX4IQMOUUVeiohTt8A:12345?wait_for_completion=true&timeout=10s&pretty'` | 你可以等待所有任務中的某個動作類型直到完成。這個命令將等待所有的**reindex**?任務直到完成 :? | `curl -XGET?``'localhost:9200/_tasks?actions=*reindex&wait_for_completion=true&timeout=10s&pretty'` | 可以使用?**_cat**?列出任務命令列表,它接受與標準的?**list task**?命令相同的參數。 | `curl -XGET?``'localhost:9200/_cat/tasks?pretty'` | ## Task Cancellation(任務取消) 如果一個長期運行的任務支持取消,可以通過下列的命令來取消它 :? | `curl -XPOST?``'localhost:9200/_tasks/task_id:1/_cancel?pretty'` | 該任務取消命令支持和?**list tasks**?命令相同的任務選擇參數,所以多個任務可以在同時取消。例如,下面的命令將取消所有運行在?**nodeId1**?和?**nodeId2**?上的**reindex**?任務。 | `curl -XPOST?``'localhost:9200/_tasks/_cancel?nodes=nodeId1,nodeId2&actions=*reindex&pretty'` | ## Task Grouping(任務組) 通過使用?**task API**?命令使用?**group_by**?參數可以通過?**nodes**(默認)或者父任務來分組以返回任務列表。下面的命令將改變分組為父任務 :? | `curl -XGET?``'localhost:9200/_tasks?group_by=parents&pretty'` |
                  <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>

                              哎呀哎呀视频在线观看