| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
| <concept id="impala_kill_query" rev="4.5.0 IMPALA-12648"> |
| <title>KILL QUERY Statements</title> |
| <titlealts audience="PDF"> |
| <navtitle>KILL QUERY</navtitle> |
| </titlealts> |
| <prolog> |
| <metadata> |
| <data name="Category" value="Impala"/> |
| <data name="Category" value="SQL"/> |
| <data name="Category" value="Kill Query"/> |
| <data name="Category" value="Data Analysts"/> |
| <data name="Category" value="Developers"/> |
| <data name="Category" value="Tables"/> |
| <data name="Category" value="ETL"/> |
| </metadata> |
| </prolog> |
| <conbody> |
| <p>The <codeph>KILL QUERY</codeph> statement allows you to programmatically terminate running |
| queries by specifying their query ids. This functionality helps manage workloads by enabling |
| users to cancel and unregister queries across any coordinator in the cluster.</p> |
| <p> |
| <b>Syntax:</b> |
| </p> |
| <codeblock id="codeblock_vjr_mry_52c">KILL QUERY '<varname>query_id</varname>';</codeblock> |
| <p>Replace '<varname>query_id</varname>' with the query id you want to terminate.</p> |
| <p><b>Example:</b></p> |
| <codeblock id="codeblock_jfk_sry_52c">KILL QUERY '123:456';</codeblock> |
| <p><varname>query_id</varname> represents a query that is currently executing in the system.</p> |
| <p><b>Required privileges</b>: Only administrators or query owners can execute <codeph>KILL |
| QUERY</codeph>.</p> |
| <p><b>Cancellation</b>: Cannot be cancelled.</p> |
| <p><b>Considerations</b>: If the specified query is not found on any of the coordinators in the |
| cluster, a <codeph>Could not find query on any coordinator</codeph> error is returned.</p> |
| <p> |
| <b>Added in:</b> |
| <keyword keyref="impala45"/> |
| </p> |
| </conbody> |
| </concept> |