You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jr...@apache.org on 2018/01/12 21:26:55 UTC

impala git commit: IMPALA-5736: [DOCS] Document --query_option for impala-shell

Repository: impala
Updated Branches:
  refs/heads/master e0c993003 -> b5e2f338a


IMPALA-5736: [DOCS] Document --query_option for impala-shell

Change-Id: I5fa4fc27d6566e87fdabe57edc176133d586a84b
Reviewed-on: http://gerrit.cloudera.org:8080/8771
Reviewed-by: Michael Brown <mi...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/b5e2f338
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/b5e2f338
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/b5e2f338

Branch: refs/heads/master
Commit: b5e2f338abe073438c80ef1ce2dea2294d87df7d
Parents: e0c9930
Author: John Russell <jr...@cloudera.com>
Authored: Tue Dec 5 15:18:39 2017 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Fri Jan 12 20:39:52 2018 +0000

----------------------------------------------------------------------
 docs/topics/impala_query_options.xml |  6 ++++++
 docs/topics/impala_set.xml           | 11 +++++++++++
 docs/topics/impala_shell_options.xml | 33 +++++++++++++++++++++++++++++--
 3 files changed, 48 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/b5e2f338/docs/topics/impala_query_options.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_query_options.xml b/docs/topics/impala_query_options.xml
index ce4af2e..36127f4 100644
--- a/docs/topics/impala_query_options.xml
+++ b/docs/topics/impala_query_options.xml
@@ -61,6 +61,12 @@ under the License.
         <codeph>SET</codeph> statement. Formerly, <codeph>SET</codeph> was only available as a command within the
         <cmdname>impala-shell</cmdname> interpreter.
       </p>
+      <p rev="2.11.0">
+        In <keyword keyref="impala211_full"/> and later, you can set query options for an <cmdname>impala-shell</cmdname> session
+        by specifying one or more command-line arguments of the form
+        <codeph>--query_option=<varname>option</varname>=<varname>value</varname></codeph>.
+        See <xref keyref="shell_options"/> for details.
+      </p>
     </note>
 
 <!-- This is the list including defaults from the pre-release 1.2 impala-shell:

http://git-wip-us.apache.org/repos/asf/impala/blob/b5e2f338/docs/topics/impala_set.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_set.xml b/docs/topics/impala_set.xml
index 598fc4b..0020188 100644
--- a/docs/topics/impala_set.xml
+++ b/docs/topics/impala_set.xml
@@ -122,6 +122,17 @@ under the License.
     </p>
 
     <p>
+      <b>Setting query options during impala-shell invocation:</b>
+    </p>
+
+    <p rev="2.11.0 IMPALA-5736">
+      In <keyword keyref="impala211_full"/> and higher, you can use one or more command-line options
+      of the form <codeph>--query_option=<varname>option</varname>=<varname>value</varname></codeph>
+      when running the <cmdname>impala-shell</cmdname> command. The corresponding query option settings
+      take effect for that <cmdname>impala-shell</cmdname> session.
+    </p>
+
+    <p>
       <b>User-specified substitution variables:</b>
     </p>
 

http://git-wip-us.apache.org/repos/asf/impala/blob/b5e2f338/docs/topics/impala_shell_options.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_shell_options.xml b/docs/topics/impala_shell_options.xml
index 6e370fe..43e8162 100644
--- a/docs/topics/impala_shell_options.xml
+++ b/docs/topics/impala_shell_options.xml
@@ -278,6 +278,27 @@ under the License.
                 </p>
               </entry>
             </row>
+            <row rev="2.11.0 IMPALA-5736">
+              <entry>
+                <p>
+                  --query_option="<varname>option</varname>=<varname>value</varname>"
+                  -Q "<varname>option</varname>=<varname>value</varname>"
+                </p>
+              </entry>
+              <entry rev="2.0.0">
+                <p>
+                 Header line <codeph>[impala.query_options]</codeph>,
+                 followed on subsequent lines by <varname>option</varname>=<varname>value</varname>, one option per line.
+                </p>
+              </entry>
+              <entry>
+                <p>
+                  Sets default query options for an invocation of the <cmdname>impala-shell</cmdname> command.
+                  To set multiple query options at once, use more than one instance of this command-line option.
+                  The query option names are not case-sensitive.
+                </p>
+              </entry>
+            </row>
             <row>
               <entry>
                 <p>
@@ -594,9 +615,14 @@ output_file=/home/tester1/benchmark_results.csv
 show_profiles=true
 </codeblock>
 
-      <p>
+      <p rev="2.11.0 IMPALA-5736">
         The following example shows a configuration file that connects to a specific remote Impala node, runs a
-        single query within a particular database, then exits. You would typically use this kind of single-purpose
+        single query within a particular database, then exits. Any query options predefined under the
+        <codeph>[impala.query_options]</codeph> section in the configuration file take effect during the session.
+      </p>
+
+      <p>
+        You would typically use this kind of single-purpose
         configuration setting with the <cmdname>impala-shell</cmdname> command-line option
         <codeph>--config_file=<varname>path_to_config_file</varname></codeph>, to easily select between many
         predefined queries that could be run against different databases, hosts, or even different clusters. To run
@@ -609,6 +635,9 @@ impalad=impala-test-node1.example.com
 default_db=site_stats
 # Issue a predefined query and immediately exit.
 query=select count(*) from web_traffic where event_date = trunc(now(),'dd')
+
+<ph rev="2.11.0 IMPALA-5736">[impala.query_options]
+mem_limit=32g</ph>
 </codeblock>
     </conbody>
   </concept>