You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2019/06/25 15:45:29 UTC

[impala] 17/20: IMPALA-5826 IMPALA-7162: [DOCS] Documented the IDLE_SESSION_TIMEOUT query option

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

tarmstrong pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/impala.git

commit ba241d6822133e38eaa2f9c590684881a0d30201
Author: Alex Rodoni <ar...@cloudera.com>
AuthorDate: Fri Jul 20 15:09:13 2018 -0700

    IMPALA-5826 IMPALA-7162: [DOCS] Documented the IDLE_SESSION_TIMEOUT query option
    
    Also, clarified cancelled queries vs closed queries
    
    Change-Id: I37182a3c5cf19fdcbb5f247ed71d43f963143510
    Reviewed-on: http://gerrit.cloudera.org:8080/11004
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 docs/impala.ditamap                         |   1 +
 docs/shared/impala_common.xml               |  19 ++++--
 docs/topics/impala_idle_session_timeout.xml | 100 ++++++++++++++++++++++++++++
 docs/topics/impala_timeouts.xml             |  90 +++++++++++++++++--------
 4 files changed, 177 insertions(+), 33 deletions(-)

diff --git a/docs/impala.ditamap b/docs/impala.ditamap
index 8872fa1..02eb9a7 100644
--- a/docs/impala.ditamap
+++ b/docs/impala.ditamap
@@ -195,6 +195,7 @@ under the License.
           <topicref href="topics/impala_explain_level.xml"/>
           <topicref href="topics/impala_hbase_cache_blocks.xml"/>
           <topicref href="topics/impala_hbase_caching.xml"/>
+          <topicref href="topics/impala_idle_session_timeout.xml"/>
           <topicref href="topics/impala_kudu_read_mode.xml"/>
           <topicref href="topics/impala_live_progress.xml"/>
           <topicref href="topics/impala_live_summary.xml"/>
diff --git a/docs/shared/impala_common.xml b/docs/shared/impala_common.xml
index f96e3d7..314d157 100644
--- a/docs/shared/impala_common.xml
+++ b/docs/shared/impala_common.xml
@@ -3708,13 +3708,20 @@ sudo pip-python install ssl</codeblock>
 
       <note id="timeout_clock_blurb">
         <p>
-          The timeout clock for queries and sessions only starts ticking when the query or session is idle.
-          For queries, this means the query has results ready but is waiting for a client to fetch the data. A
-          query can run for an arbitrary time without triggering a timeout, because the query is computing results
-          rather than sitting idle waiting for the results to be fetched. The timeout period is intended to prevent
-          unclosed queries from consuming resources and taking up slots in the admission count of running queries,
-          potentially preventing other queries from starting.
+          The timeout clock for queries and sessions only starts ticking when
+          the query or session is idle.
         </p>
+
+        <p>
+          For queries, this means the query has results ready but is waiting
+          for a client to fetch the data. A query can run for an arbitrary time
+          without triggering a timeout, because the query is computing results
+          rather than sitting idle waiting for the results to be fetched. The
+          timeout period is intended to prevent unclosed queries from consuming
+          resources and taking up slots in the admission count of running
+          queries, potentially preventing other queries from starting.
+        </p>
+
         <p>
           For sessions, this means that no query has been submitted for some period of time.
         </p>
diff --git a/docs/topics/impala_idle_session_timeout.xml b/docs/topics/impala_idle_session_timeout.xml
new file mode 100644
index 0000000..ac718ed
--- /dev/null
+++ b/docs/topics/impala_idle_session_timeout.xml
@@ -0,0 +1,100 @@
+<?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 rev="2.12.0" id="idle_session_timeout">
+
+  <title>IDLE_SESSION_TIMEOUT Query Option (<keyword keyref="impala212_full"/> or higher only)</title>
+
+  <titlealts audience="PDF">
+
+    <navtitle>IDLE_SESSION_TIMEOUT</navtitle>
+
+  </titlealts>
+
+  <prolog>
+    <metadata>
+      <data name="Category" value="Impala"/>
+      <data name="Category" value="Impala Query Options"/>
+      <data name="Category" value="Querying"/>
+      <data name="Category" value="Developers"/>
+      <data name="Category" value="Data Analysts"/>
+    </metadata>
+  </prolog>
+
+  <conbody>
+
+    <p rev="2.12.0">
+      The <codeph>IDLE_SESSION_TIMEOUT</codeph> query option sets the time in seconds after
+      which an idle session is cancelled. A session is idle when no activity is occurring for
+      any of the queries in that session, and the session has not started any new queries. Once
+      a session is expired, you cannot issue any new query requests to it. The session remains
+      open, but the only operation you can perform is to close it.
+    </p>
+
+    <p rev="2.12.0">
+      The <codeph>IDLE_SESSION_TIMEOUT</codeph> query option overrides the
+      <codeph>--idle_session_timeout</codeph> startup option. See
+      <xref href="impala_timeouts.xml#timeouts"/> for the
+      <codeph>--idle_session_timeout</codeph> startup option.
+    </p>
+
+    <p>
+      The <codeph>IDLE_SESSION_TIMEOUT</codeph> query option allows JDBC/ODBC connections to set
+      the session timeout as a query option with the <codeph>SET</codeph> statement.
+    </p>
+
+    <p>
+      <b>Syntax:</b>
+    </p>
+
+<codeblock>SET IDLE_SESSION_TIMEOUT=<varname>seconds</varname>;</codeblock>
+
+    <p>
+      <b>Type:</b> numeric
+    </p>
+
+    <p>
+      <b>Default:</b> 0
+      <ul>
+        <li>
+          If <codeph>--idle_session_timeout</codeph> is not set, the session never expires.
+        </li>
+
+        <li>
+          If <codeph>--idle_session_timeout</codeph> is set, use that timeout value.
+        </li>
+      </ul>
+    </p>
+
+    <p>
+      <b>Added in:</b> <keyword keyref="impala212_full"/>
+    </p>
+
+    <p>
+      <b>Related information:</b>
+    </p>
+
+    <p>
+      <xref href="impala_timeouts.xml#timeouts"/>
+    </p>
+
+  </conbody>
+
+</concept>
diff --git a/docs/topics/impala_timeouts.xml b/docs/topics/impala_timeouts.xml
index 80e5c9b..3389f5a 100644
--- a/docs/topics/impala_timeouts.xml
+++ b/docs/topics/impala_timeouts.xml
@@ -96,38 +96,59 @@ Trying to re-register with state-store</codeblock>
       <note conref="../shared/impala_common.xml#common/timeout_clock_blurb"/>
 
       <p>
-        Specify the following startup options for the <cmdname>impalad</cmdname> daemon:
+        Use the following startup options for the <cmdname>impalad</cmdname>
+        daemon to specify timeout values:
       </p>
 
       <ul>
-        <li>
+        <li><codeph>--idle_query_timeout</codeph>
           <p>
-            The <codeph>--idle_query_timeout</codeph> option specifies the time in seconds after
-            which an idle query is cancelled. This could be a query whose results were all fetched
-            but was never closed, or one whose results were partially fetched and then the client
-            program stopped requesting further results. This condition is most likely to occur in
-            a client program using the JDBC or ODBC interfaces, rather than in the interactive
-            <cmdname>impala-shell</cmdname> interpreter. Once the query is cancelled, the client
-            program cannot retrieve any further results.
+            Specifies the time in
+            seconds after which an idle query is cancelled. This could be a
+            query whose results were all fetched but was never closed, or one
+            whose results were partially fetched and then the client program
+            stopped requesting further results. This condition is most likely to
+            occur in a client program using the JDBC or ODBC interfaces, rather
+            than in the interactive <cmdname>impala-shell</cmdname> interpreter.
+            Once a query is cancelled, the client program cannot retrieve any
+            further results from the query.
           </p>
-
           <p rev="2.0.0">
-            You can reduce the idle query timeout by using the <codeph>QUERY_TIMEOUT_S</codeph>
-            query option. Any non-zero value specified for the <codeph>--idle_query_timeout</codeph> startup
-            option serves as an upper limit for the <codeph>QUERY_TIMEOUT_S</codeph> query option.
-            A zero value for <codeph>--idle_query_timeout</codeph> disables query timeouts.
-            See <xref href="impala_query_timeout_s.xml#query_timeout_s"/> for details.
+            You can reduce
+            the idle query timeout by using the <codeph>QUERY_TIMEOUT_S</codeph>
+            query option. Any non-zero value specified for the
+              <codeph>--idle_query_timeout</codeph> startup option serves as an
+            upper limit for the <codeph>QUERY_TIMEOUT_S</codeph> query option.
+            See <xref href="impala_query_timeout_s.xml#query_timeout_s"/> about
+            the query option.
+          </p>
+          <p rev="2.0.0">A zero value for
+              <codeph>--idle_query_timeout</codeph> disables query timeouts.
+          </p>
+          <p>
+            Cancelled queries remain in the open state but use only the
+            minimal resources.
           </p>
         </li>
 
-        <li>
+        <li><codeph>--idle_session_timeout</codeph>
+          <p>
+            Specifies the time in
+            seconds after which an idle session expires. A session is idle when
+            no activity is occurring for any of the queries in that session, and
+            the session has not started any new queries. Once a session is
+            expired, you cannot issue any new query requests to it. The session
+            remains open, but the only operation you can perform is to close it.
+          </p>
           <p>
-            The <codeph>--idle_session_timeout</codeph> option specifies the time in seconds after
-            which an idle session is expired. A session is idle when no activity is occurring for
-            any of the queries in that session, and the session has not started any new queries.
-            Once a session is expired, you cannot issue any new query requests to it. The session
-            remains open, but the only operation you can perform is to close it. The default value
-            of 0 means that sessions never expire.
+            The default value of 0 specifies sessions never
+            expire.
+          </p>
+          <p rev="2.12.0">
+            You can override the
+              <codeph>--idle_session_timeout</codeph> value with the <xref
+              href="impala_idle_session_timeout.xml#idle_session_timeout"/> at
+            the session level.
           </p>
         </li>
       </ul>
@@ -185,11 +206,26 @@ Trying to re-register with state-store</codeblock>
     <conbody>
 
       <p>
-        Sometimes, an Impala query might run for an unexpectedly long time, tying up resources
-        in the cluster. You can cancel the query explicitly, independent of the timeout period,
-        by going into the web UI for the <cmdname>impalad</cmdname> host (on port 25000 by
-        default), and using the link on the <codeph>/queries</codeph> tab to cancel the running
-        query. For example, press <codeph>^C</codeph> in <cmdname>impala-shell</cmdname>.
+        Sometimes, an Impala query might run for an unexpectedly long time,
+        tying up resources in the cluster. You can cancel the query explicitly,
+        independent of the timeout period, by going into the web UI for the
+          <cmdname>impalad</cmdname> host (on port 25000 by default), and using
+        the link on the <codeph>/queries</codeph> tab to cancel the running
+        query.
+      </p>
+
+      <p>
+        Various client applications let you interactively cancel queries
+        submitted or monitored through those applications. For example:
+        <ul>
+          <li>
+            Press <systemoutput>^C</systemoutput> in
+            <cmdname>impala-shell</cmdname>.
+          </li>
+          <li>
+            Click <b>Cancel</b> from the <b>Watch</b>page in Hue.
+          </li>
+        </ul>
       </p>
 
     </conbody>