You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2020/09/30 12:06:07 UTC

[ignite] branch IGNITE-7595 updated: KILL commands docs added. (#8280)

This is an automated email from the ASF dual-hosted git repository.

nizhikov pushed a commit to branch IGNITE-7595
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/IGNITE-7595 by this push:
     new 78487e3  KILL commands docs added. (#8280)
78487e3 is described below

commit 78487e351a76945f167f110d8a4d112d4fcdd9c9
Author: Nikolay <ni...@apache.org>
AuthorDate: Wed Sep 30 15:05:56 2020 +0300

    KILL commands docs added. (#8280)
---
 docs/_docs/sql-reference/operational-commands.adoc | 237 +++++++++++++++++++++
 1 file changed, 237 insertions(+)

diff --git a/docs/_docs/sql-reference/operational-commands.adoc b/docs/_docs/sql-reference/operational-commands.adoc
index 482f784..02f3761 100644
--- a/docs/_docs/sql-reference/operational-commands.adoc
+++ b/docs/_docs/sql-reference/operational-commands.adoc
@@ -113,3 +113,240 @@ After executing the above command and *closing the JDBC connection*, all data wi
 image::images/set-streaming.png[]
 
 
+== KILL QUERY
+
+The `KILL QUERY` command allows you to cancel a running query.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL QUERY {ASYNC} 'query_id'
+----
+
+tab:JMX[]
+[source,java]
+----
+QueryMXBean mxBean = ...;
+mxBean.cancelSQL(queryId);
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill SQL query_id
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill SQL query_id
+----
+
+--
+
+=== Description
+`query_id` can be retrived via the `SQL_QUERIES` view.
+`ASYNC` is an optional parameter which returns control immediately without waiting for the cancellation to finish, and `query_id` can be retrieved via the `SQL_QUERIES` view.
+
+When a query cancelled via the `KILL` command, all parts of the query running on all other nodes are cancelled.
+
+== KILL TRANSACTION
+
+The `KILL TRANSACTION` command allows you to cancel a running transaction.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL TRANSACTION 'xid'
+----
+
+tab:JMX[]
+[source,java]
+----
+TransactionMXBean mxBean = ...;
+mxBean.cancel(xid);
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill TRANSACTION xid
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill TRANSACTION xid
+----
+
+--
+
+=== Description
+`xid` of the transaction can be retrived via the `TRANSACTIONS` view.
+
+== KILL SCAN
+
+The `KILL SCAN` command allows you to cancel a running scan query.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL SCAN 'origin_node_id' 'cache_name' query_id
+----
+
+tab:JMX[]
+[source,java]
+----
+QueryMXBean mxBean = ....;
+mxBean.cancelScan(originNodeId, cacheName, queryId);
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill SCAN origin_node_id cache_name query_id
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill SCAN origin_node_id cache_name query_id
+----
+
+--
+
+=== Description
+`origin_node_id`, `cache_name`, `query_id` parameters can be retrived via the `SCAN_QUERIES`.
+
+=== Example
+
+[source,sql]
+----
+KILL SCAN '6fa749ee-7cf8-4635-be10-36a1c75267a7_54321' 'cache-name' 1
+----
+
+== KILL COMPUTE
+
+The `KILL COMPUTE` command allows you to cancel a running compute.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL COMPUTE 'session_id'
+----
+
+tab:JMX[]
+[source,java]
+----
+ ComputeMXBean#cancel
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill COMPUTE session_id
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill COMPUTE session_id
+----
+
+--
+
+=== Description
+`session_id` parameter can be retrived via the `TASKS` or `JOBS` view.
+
+== KILL CONTINUOUS
+
+The `KILL CONTINUOUS` command allows you to cancel a running continuous query.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL CONTINUOUS 'origin_node_id', 'routine_id'
+----
+
+tab:JMX[]
+[source,java]
+----
+QueryMXBean mxBean = ...;
+mxBean.cancelContinuous(originNodeId, routineId);
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill CONTINUOUS origin_node_id routine_id
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill CONTINUOUS origin_node_id routine_id
+----
+
+--
+
+=== Description
+`origin_node_id` and `routine_id` can be retrived via `CONTINUOUS_QUERIES` view.
+
+=== Example
+
+[source,sql]
+----
+KILL CONTINUOUS '6fa749ee-7cf8-4635-be10-36a1c75267a7_54321' '6fa749ee-7cf8-4635-be10-36a1c75267a7_12345'
+----
+
+== KILL SERVICE
+
+The `KILL SERVICE` command allows you to cance a running service.
+
+[tabs]
+--
+
+tab:SQL[]
+[source,sql]
+----
+KILL SERVICE 'name'
+----
+
+tab:JMX[]
+[source,java]
+----
+ServiceMXBean mxBean = ...;
+mxBean.cancel(name);
+----
+
+tab:Unix[]
+[source,bash]
+----
+./control.sh --kill SERVICE name
+----
+
+tab:Windows[]
+[source,bash]
+----
+.\control.bat --kill SERVICE name
+----
+
+--
+
+=== Description
+`name` of the service user specifies on deployment. It can be retrieved via `SERVICES` view, also.
\ No newline at end of file