You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/08/05 22:23:47 UTC

[impala] branch master updated: IMPALA-8668: [DOCS] HS2 Support for Impala-Shell connection

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

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new cdc5869  IMPALA-8668: [DOCS] HS2 Support for Impala-Shell connection
cdc5869 is described below

commit cdc586916d25533a5edb0f196fd7e036293657e6
Author: Alex Rodoni <ar...@cloudera.com>
AuthorDate: Tue Jul 30 17:56:12 2019 -0700

    IMPALA-8668: [DOCS] HS2 Support for Impala-Shell connection
    
    Change-Id: Ie4e207d247409ac3069ce8a235be3f63e616007e
    Reviewed-on: http://gerrit.cloudera.org:8080/13961
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Alex Rodoni <ar...@cloudera.com>
---
 docs/topics/impala_connecting.xml    | 88 ++++++++++++++----------------------
 docs/topics/impala_shell_options.xml | 84 +++++++++++++++++++---------------
 2 files changed, 81 insertions(+), 91 deletions(-)

diff --git a/docs/topics/impala_connecting.xml b/docs/topics/impala_connecting.xml
index 84d7ba0..f6a3c17 100644
--- a/docs/topics/impala_connecting.xml
+++ b/docs/topics/impala_connecting.xml
@@ -20,7 +20,7 @@ under the License.
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
 <concept id="connecting">
 
-  <title>Connecting to impalad through impala-shell</title>
+  <title>Connecting to Impala Daemon from impala-shell</title>
   <titlealts audience="PDF"><navtitle>Connecting to impalad</navtitle></titlealts>
   <prolog>
     <metadata>
@@ -35,27 +35,20 @@ under the License.
 
   <conbody>
 
-<!--
-TK: This would be a good theme for a tutorial topic.
-Lots of nuances to illustrate through sample code.
--->
-
-    <p>
-      Within an <cmdname>impala-shell</cmdname> session, you can only issue queries while connected to an instance
-      of the <cmdname>impalad</cmdname> daemon. You can specify the connection information:
-      <ul>
-        <li>
-          Through command-line options when you run the <cmdname>impala-shell</cmdname> command.
-        </li>
-        <li>
-          Through a configuration file that is read when you run the <cmdname>impala-shell</cmdname> command.
-        </li>
-        <li>
-          During an <cmdname>impala-shell</cmdname> session, by issuing a <codeph>CONNECT</codeph> command.
-        </li>
-      </ul>
-      See <xref href="impala_shell_options.xml"/> for the command-line and configuration file options you can use.
-    </p>
+    <p> Within an <cmdname>impala-shell</cmdname> session, you can only issue
+      queries while connected to an instance of the <cmdname>impalad</cmdname>
+      daemon. You can specify the connection information: <ul>
+        <li> Through command-line options when you run the
+            <cmdname>impala-shell</cmdname> command. </li>
+        <li> Through a configuration file that is read when you run the
+            <cmdname>impala-shell</cmdname> command. </li>
+        <li> During an <cmdname>impala-shell</cmdname> session, by issuing a
+            <codeph>CONNECT</codeph> command. </li>
+      </ul><note>You cannot connect to the 3.2 or earlier versions of Impala
+        using the <codeph>'hs2'</codeph> or <codeph>'hs2-http'</codeph> protocol
+          (<codeph>--protocol</codeph> option).</note> See <xref
+        href="impala_shell_options.xml"/> for the command-line and configuration
+      file options you can use. </p>
 
     <p> You can connect to any Impala daemon (<cmdname>impalad</cmdname>), and
       that daemon coordinates the execution of all queries sent to it. </p>
@@ -72,7 +65,7 @@ Lots of nuances to illustrate through sample code.
         href="impala_proxy.xml"/> for details. </p>
 
     <p>
-      <b>To connect the Impala shell during shell startup:</b>
+      <b>To connect to an Impala during shell startup:</b>
     </p>
 
     <ol>
@@ -82,46 +75,31 @@ Lots of nuances to illustrate through sample code.
           <cmdname>impala-shell</cmdname> connections, find out the port number
         also. </li>
 
-      <li>
-        Use the <codeph>-i</codeph> option to the
-        <cmdname>impala-shell</cmdname> interpreter to specify the connection information for
-        that instance of <cmdname>impalad</cmdname>:
-<codeblock># When you are logged into the same machine running impalad.
+      <li> Use the <codeph>-i</codeph> option to the
+          <cmdname>impala-shell</cmdname> interpreter to specify the connection
+        information for that instance of <cmdname>impalad</cmdname>:
+        <codeblock># When you are connecting to an impalad running on the same machine.
 # The prompt will reflect the current hostname.
 $ impala-shell
 
-# When you are logged into the same machine running impalad.
-# The host will reflect the hostname 'localhost'.
-$ impala-shell -i localhost
-
-# When you are logged onto a different host, perhaps a client machine
-# outside the Hadoop cluster.
-$ impala-shell -i <varname>some.other.hostname</varname>
-
-# When you are logged onto a different host, and impalad is listening
-# on a non-default port. Perhaps a load balancer is forwarding requests
-# to a different host/port combination behind the scenes.
+# When you are connecting to an impalad running on a remote machine, and impalad is listening
+# on a non-default port over the HTTP HiveServer2 protocol.
+$ impala-shell -i <varname>some.other.hostname</varname>:<varname>port_number</varname> --protocol='hs2-http'
+# When you are connecting to an impalad running on a remote machine, and impalad is listening
+# on a non-default port.
 $ impala-shell -i <varname>some.other.hostname</varname>:<varname>port_number</varname>
 </codeblock>
       </li>
     </ol>
 
     <p>
-      <b>To connect the Impala shell after shell startup:</b>
+      <b>To connect to an Impala in the<cmdname>impala-shell</cmdname>
+        session:</b>
     </p>
 
     <ol>
-      <li>
-        Start the Impala shell with no connection:
-<codeblock>$ impala-shell</codeblock>
-        <p>
-          You should see a prompt like the following:
-        </p>
-<codeblock>Welcome to the Impala shell. Press TAB twice to see a list of available commands.
-...
-<ph conref="../shared/ImpalaVariables.xml#impala_vars/ShellBanner"/>
-[Not connected] &gt; </codeblock>
-      </li>
+      <li> Start the Impala shell with no connection:
+        <codeblock>$ impala-shell</codeblock></li>
 
       <li> Locate the hostname that is running the <cmdname>impalad</cmdname>
         daemon. If that <cmdname>impalad</cmdname> uses a non-default port
@@ -129,10 +107,10 @@ $ impala-shell -i <varname>some.other.hostname</varname>:<varname>port_number</v
         connections, find out the port number also. </li>
 
       <li> Use the <codeph>connect</codeph> command to connect to an Impala
-        instance. Enter a command of the form: <codeblock>[Not connected] &gt; connect <varname>impalad-host</varname>
-[<varname>impalad-host</varname>:21000] &gt;</codeblock>
-        <note> Replace <varname>impalad-host</varname> with the hostname you
-          have configured to run Impala in your environment. The changed prompt
+        instance. Enter a command of the form:
+          <codeblock>[Not connected] &gt; connect <varname>impalad-host</varname></codeblock><note>
+          Replace <varname>impalad-host</varname> with the hostname you have
+          configured to run Impala in your environment. The changed prompt
           indicates a successful connection. </note>
       </li>
     </ol>
diff --git a/docs/topics/impala_shell_options.xml b/docs/topics/impala_shell_options.xml
index 9225c79..8403e13 100644
--- a/docs/topics/impala_shell_options.xml
+++ b/docs/topics/impala_shell_options.xml
@@ -83,9 +83,8 @@ under the License.
           <tbody>
             <row>
               <entry>
-                <p>
-                  -B or --delimited
-                </p>
+                <p> -B or </p>
+                <p>--delimited </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -149,8 +148,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -o <varname>filename</varname> or --output_file <varname>filename</varname>
+                <p> -o <varname>filename</varname> or </p>
+                <p>--output_file <varname>filename</varname>
                 </p>
               </entry>
               <entry rev="2.0.0">
@@ -191,9 +190,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -p or --show_profiles
-                </p>
+                <p> -p or </p>
+                <p>--show_profiles </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -209,9 +207,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -h or --help
-                </p>
+                <p> -h or </p>
+                <p>--help </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -243,10 +240,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -i <varname>hostname</varname> or
-                  --impalad=<varname>hostname</varname>[:<varname>portnum</varname>]
-                </p>
+                <p> -i <varname>hostname</varname> or </p>
+                <p>--impalad=<varname>hostname</varname>[:<varname>portnum</varname>] </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -265,8 +260,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -q <varname>query</varname> or --query=<varname>query</varname>
+                <p> -q <varname>query</varname> or </p>
+                <p>--query=<varname>query</varname>
                 </p>
               </entry>
               <entry rev="2.0.0">
@@ -289,8 +284,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -f <varname>query_file</varname> or --query_file=<varname>query_file</varname>
+                <p> -f <varname>query_file</varname> or</p>
+                <p> --query_file=<varname>query_file</varname>
                 </p>
               </entry>
               <entry rev="2.0.0">
@@ -309,10 +304,11 @@ under the License.
             </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>
+                <p> --query_option=</p>
+                <p>"<varname>option</varname>=</p>
+                <p><varname>value</varname>" </p>
+                <p>-Q "<varname>option</varname>=</p>
+                <p><varname>value</varname>" </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -330,9 +326,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -k or --kerberos
-                </p>
+                <p> -k or </p>
+                <p>--kerberos </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -353,8 +348,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -s <varname>kerberos_service_name</varname> or --kerberos_service_name=<varname>name</varname>
+                <p> -s <varname>kerberos_service_name</varname> or </p>
+                <p>--kerberos_service_name=<varname>name</varname>
                 </p>
               </entry>
               <entry rev="2.0.0">
@@ -373,9 +368,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -V or --verbose
-                </p>
+                <p> -V or </p>
+                <p>--verbose </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -408,9 +402,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -v or --version
-                </p>
+                <p> -v or </p>
+                <p>--version </p>
               </entry>
               <entry rev="2.0.0">
                 <p>
@@ -442,8 +435,8 @@ under the License.
             </row>
             <row>
               <entry>
-                <p>
-                  -d <varname>default_db</varname> or --database=<varname>default_db</varname>
+                <p> -d <varname>default_db</varname> or </p>
+                <p>--database=<varname>default_db</varname>
                 </p>
               </entry>
               <entry rev="2.0.0">
@@ -570,6 +563,25 @@ under the License.
                 and hence may be vulnerable to an attack.
               </entry>
             </row>
+            <row>
+              <entry>--protocol=<varname>protocol</varname></entry>
+              <entry>N/A</entry>
+              <entry>Protocol to use for the connection to Impala. <p>Valid
+                    <varname>protocol</varname> values are:<ul>
+                    <li><codeph>'hs2'</codeph>: Impala-shell uses the binary TCP
+                      based transport to speak to the Impala Daemon via the
+                      HiveServer2 protocol.</li>
+                    <li><codeph>'hs2-http'</codeph>: Impala-shell uses HTTP
+                      transport to speak to the Impala Daemon via the
+                      HiveServer2 protocol.</li>
+                    <li><codeph>'beeswax'</codeph>: Impala-shell uses the binary
+                      TCP based transport to speak to the Impala Daemon via
+                      Beeswax. This is the current default setting.</li>
+                  </ul></p><p>You cannot connect to the 3.2 or earlier versions
+                  of Impala using the <codeph>'hs2'</codeph> or
+                    <codeph>'hs2-http'</codeph> option.</p><p>Beeswax support is
+                  deprecated and will be removed in the future.</p></entry>
+            </row>
           </tbody>
         </tgroup>
       </table>