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 2017/09/29 19:14:36 UTC

[6/6] incubator-impala git commit: IMPALA-992: [DOCS] Document impala-shell 'rerun' command

IMPALA-992: [DOCS] Document impala-shell 'rerun' command

Change-Id: I78b353af3b3d8386c243f884b37442b5283a96a8
Reviewed-on: http://gerrit.cloudera.org:8080/8044
Reviewed-by: John Russell <jr...@cloudera.com>
Tested-by: Impala Public Jenkins


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

Branch: refs/heads/master
Commit: 64d0dd93eca13ae27714f1aadf90bf9f6e2c9c15
Parents: 1969c56
Author: John Russell <jr...@cloudera.com>
Authored: Tue Sep 12 14:51:15 2017 -0700
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Fri Sep 29 18:38:03 2017 +0000

----------------------------------------------------------------------
 docs/impala_keydefs.ditamap                   |  1 +
 docs/topics/impala_shell_commands.xml         | 24 ++++++++
 docs/topics/impala_shell_running_commands.xml | 65 ++++++++++++++++++++++
 3 files changed, 90 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/64d0dd93/docs/impala_keydefs.ditamap
----------------------------------------------------------------------
diff --git a/docs/impala_keydefs.ditamap b/docs/impala_keydefs.ditamap
index 3c47329..3068ca4 100644
--- a/docs/impala_keydefs.ditamap
+++ b/docs/impala_keydefs.ditamap
@@ -10894,6 +10894,7 @@ under the License.
   <keydef href="topics/impala_shell_options.xml#shell_config_file" keys="shell_config_file"/>
   <keydef href="topics/impala_connecting.xml" keys="connecting"/>
   <keydef href="topics/impala_shell_running_commands.xml" keys="shell_running_commands"/>
+  <keydef href="topics/impala_shell_running_commands.xml#rerun" keys="rerun"/>
   <keydef href="topics/impala_shell_commands.xml" keys="shell_commands"/>
 
   <keydef href="topics/impala_performance.xml" keys="performance"/>

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/64d0dd93/docs/topics/impala_shell_commands.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_shell_commands.xml b/docs/topics/impala_shell_commands.xml
index 3469c15..f9a48d9 100644
--- a/docs/topics/impala_shell_commands.xml
+++ b/docs/topics/impala_shell_commands.xml
@@ -245,6 +245,30 @@ under the License.
               </p>
             </entry>
           </row>
+          <row id="rerun_cmd" rev="2.10.0 IMPALA-992">
+            <entry>
+              <p>
+                <codeph>rerun</codeph> or <codeph>@</codeph>
+              </p>
+            </entry>
+            <entry>
+              <p>
+                Executes a previous <cmdname>impala-shell</cmdname> command again,
+                from the list of commands displayed by the <codeph>history</codeph>
+                command. These could be SQL statements, or commands specific to
+                <cmdname>impala-shell</cmdname> such as <codeph>quit</codeph>
+                or <codeph>profile</codeph>.
+              </p>
+              <p>
+                Specify an integer argument. A positive integer <codeph>N</codeph>
+                represents the command labelled <codeph>N</codeph> in the history list.
+                A negative integer <codeph>-N</codeph> represents the <codeph>N</codeph>th
+                command from the end of the list, such as -1 for the most recent command.
+                Commands that are executed again do not produce new entries in the
+                history list.
+              </p>
+            </entry>
+          </row>
           <row id="select_cmd">
             <entry>
               <p>

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/64d0dd93/docs/topics/impala_shell_running_commands.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_shell_running_commands.xml b/docs/topics/impala_shell_running_commands.xml
index e74d015..75a0758 100644
--- a/docs/topics/impala_shell_running_commands.xml
+++ b/docs/topics/impala_shell_running_commands.xml
@@ -280,4 +280,69 @@ Fetched 5 row(s) in 0.01s
 </codeblock>
 
   </conbody>
+
+  <concept id="rerun" rev="2.10.0 IMPALA-992">
+    <title>Rerunning impala-shell Commands</title>
+    <conbody>
+
+      <p>
+        In <keyword keyref="impala210_full"/> and higher, you can use the
+        <codeph>rerun</codeph> command, or its abbreviation <codeph>@</codeph>,
+        to re-execute commands from the history list. The argument can be
+        a positive integer (reflecting the number shown in <codeph>history</codeph>
+        output) or a negative integer (reflecting the N'th last command in the
+        <codeph>history</codeph> output. For example:
+      </p>
+
+<codeblock><![CDATA[
+[localhost:21000] > select * from p1 order by t limit 5;
+...
+[localhost:21000] > show table stats p1;
++-----------+--------+--------+------------------------------------------------------------+
+| #Rows     | #Files | Size   | Location                                                   |
++-----------+--------+--------+------------------------------------------------------------+
+| 134217728 | 50     | 4.66MB | hdfs://test.example.com:8020/user/hive/warehouse/jdr.db/p1 |
++-----------+--------+--------+------------------------------------------------------------+
+[localhost:21000] > compute stats p1;
++-----------------------------------------+
+| summary                                 |
++-----------------------------------------+
+| Updated 1 partition(s) and 3 column(s). |
++-----------------------------------------+
+[localhost:21000] > history;
+[1]: use jdr;
+[2]: history;
+[3]: show tables;
+[4]: select * from p1 order by t limit 5;
+[5]: show table stats p1;
+[6]: compute stats p1;
+[7]: history;
+[localhost:21000] > @-2; <- Rerun the 2nd last command in the history list
+Rerunning compute stats p1;
++-----------------------------------------+
+| summary                                 |
++-----------------------------------------+
+| Updated 1 partition(s) and 3 column(s). |
++-----------------------------------------+
+[localhost:21000] > history; <- History list is not updated by rerunning commands
+                                or by repeating the last command, in this case 'history'.
+[1]: use jdr;
+[2]: history;
+[3]: show tables;
+[4]: select * from p1 order by t limit 5;
+[5]: show table stats p1;
+[6]: compute stats p1;
+[7]: history;
+[localhost:21000] > @4; <- Rerun command #4 in the history list using short form '@'.
+Rerunning select * from p1 order by t limit 5;
+...
+[localhost:21000] > rerun 4; <- Rerun command #4 using long form 'rerun'.
+Rerunning select * from p1 order by t limit 5;
+...
+]]>
+</codeblock>
+
+    </conbody>
+  </concept>
+
 </concept>