blob: 05962a51e12b9c750b39764266e2928b0febbc72 [file] [log] [blame]
<?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="transparent_query_retries">
<title>Impala Transparent Query Retries</title>
<conbody>
<p>Transparent query retries will automatically retry any queries that fail
due to cluster membership changes. A cluster membership change typically
entails a node leaving the cluster before it crashed or for some other
reason stopped responding to statestore heartbeats.</p>
<p>Traditionally, if a query runs on a node in the Impala cluster, and that
node crashes, then the query will fail and it is up to the user to retry
the query. With transparent query retries, the query will be automatically
retried.</p>
<ul>
<li>Queries are only retried if the query failed due to a cluster membership
change. Trivial failures, like SQL parsing exceptions are <b>not</b>
retried.</li>
<li>Cluster membership changes fall into two categories: membership updates
from the statestore or node blacklisting events. <p>impalads periodically
send heartbeats to the statestore, if an impalad stops sending heartbeats
to the statestore then that impalad is removed from the cluster
membership</p><p>Node blacklisting events occur when a query fails and as
a result, an impalad in the cluster is added to the Coordinator's node
blacklist. In this scenario, the query is retried.</p></li>
<li>For most users, query retries will be completely transparent, but
users who want to know why a retry was necessary can use runtime profiles.
Each query attempt is modelled as a completely new query. Thus, each query
attempt has its own runtime profiles. Users can look through the profiles
of the failed query attempts to determine why the query was retried.</li>
</ul>
<p>Transparent query retries are turned off by default, but can be enabled via
the <codeph>RETRY_FAILED_QUERIES</codeph> query option.</p>
<section>
<p><b>Related information:</b>
<xref href="impala_retry_failed_queries.xml#RETRY_FAILED_QUERIES"/></p>
</section>
</conbody>
</concept>