Skip to content

Commit bd095dc

Browse files
dnskrsteveburnett
authored andcommitted
Consolidate Presto CLI documentation on clients/presto-cli.rst page
1 parent abb3399 commit bd095dc

File tree

9 files changed

+55
-81
lines changed

9 files changed

+55
-81
lines changed

presto-docs/src/main/sphinx/clients.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
**************
2-
Presto Clients
3-
**************
1+
*******
2+
Clients
3+
*******
44

55
.. toctree::
66
:maxdepth: 1

presto-docs/src/main/sphinx/clients/presto-cli.rst

+45-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
======================
2-
Command Line Interface
3-
======================
1+
==========
2+
Presto CLI
3+
==========
44

55
.. contents::
66
:local:
@@ -10,27 +10,46 @@ Command Line Interface
1010
Overview
1111
========
1212

13-
The Presto Command Line Interface (CLI) is a terminal-based interactive shell
14-
for running queries, and is a
15-
`self-executing <http://skife.org/java/unix/2011/06/20/really_executable_jars.html>`_
16-
JAR file that acts like a normal UNIX executable. The Presto CLI communicates
17-
with the Presto server over HTTP using a REST API, documented at
18-
:doc:`Presto Client REST API </develop/client-protocol>`.
13+
The Presto Command Line Interface (CLI) is a terminal-based interactive shell for running queries.
14+
It is a `self-executing <http://skife.org/java/unix/2011/06/20/really_executable_jars.html>`_
15+
JAR file that acts like a normal UNIX executable and communicates with the Presto server
16+
over HTTP using :doc:`Presto Client REST API </develop/client-protocol>`.
17+
18+
Installation
19+
======================
20+
21+
Download :maven_download:`cli`.
22+
23+
Rename the JAR file to ``presto`` with the following command
24+
(replace ``*`` with the version number of the downloaded jar file):
25+
26+
.. code-block:: none
27+
28+
mv presto-cli-*-executable.jar presto
29+
30+
Use ``chmod +x`` to make the renamed file executable:
31+
32+
.. code-block:: none
33+
34+
chmod +x presto
35+
36+
Running the Presto CLI
37+
======================
38+
39+
Start the Presto CLI using the name you gave it using the ``mv`` command:
40+
41+
.. code-block:: none
1942
20-
To install the Presto CLI, see :doc:`/installation/cli`.
43+
./presto
2144
22-
Configuration
23-
=============
45+
The Presto CLI starts and displays the prompt ``presto>``.
2446

25-
The Presto CLI paginates query results using the ``less`` program, which
26-
is configured with preset options. To change the pagination of query results, set the
27-
environment variable ``PRESTO_PAGER`` to the name of a different program such as ``more``,
28-
or set it to an empty value to disable pagination.
47+
To exit the Presto CLI, enter ``quit``.
2948

30-
Connect to a Presto server using the Presto CLI
31-
===============================================
49+
Connect to a Presto server
50+
==========================
3251

33-
To connect to a Presto server, run the CLI with the ``--server`` option.
52+
To connect to a Presto server, run the Presto CLI with the ``--server`` option.
3453

3554
.. code-block:: none
3655
@@ -39,14 +58,18 @@ To connect to a Presto server, run the CLI with the ``--server`` option.
3958
``localhost:8080`` is the default for a Presto server, so if you have a Presto server running locally you can
4059
leave it off.
4160

42-
To connect to a remote Presto server, use the Presto endpoint URL as in
43-
the following example command:
61+
To connect to a remote Presto server, use the Presto endpoint URL as in the following example command:
4462

4563
.. code-block:: none
4664
4765
./presto --server http://www.example.net:8080
4866
67+
Pagination
68+
==========
4969

70+
The Presto CLI paginates query results using the ``less`` program, which is configured with preset options.
71+
To change the pagination of query results, set the environment variable ``PRESTO_PAGER``
72+
to the name of a different program such as ``more``, or set it to an empty value to disable pagination.
5073

5174
Examples
5275
========
@@ -66,7 +89,7 @@ JSON format in a file named ``plan.json``.
6689
Online Help
6790
===========
6891

69-
Run the CLI with the ``--help`` option to see the online help.
92+
Run the Presto CLI with the ``--help`` option to see the online help.
7093

7194
.. code-block:: none
7295

presto-docs/src/main/sphinx/connector/kafka-tutorial.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Because the Kafka tables all have the ``tpch.`` prefix in the configuration,
116116
the tables are in the ``tpch`` schema. The connector is mounted into the
117117
``kafka`` catalog because the properties file is named ``kafka.properties``.
118118

119-
Start the :doc:`Presto CLI </installation/cli>`:
119+
Start the :doc:`/clients/presto-cli`:
120120

121121
.. code-block:: none
122122

presto-docs/src/main/sphinx/installation.rst

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Installation
66
:maxdepth: 1
77

88
installation/deployment
9-
installation/cli
109
installation/jdbc
1110
installation/benchmark-driver
1211
installation/tableau

presto-docs/src/main/sphinx/installation/cli.rst

-48
This file was deleted.

presto-docs/src/main/sphinx/installation/deploy-brew.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ To run the Presto CLI, run the following command:
9393

9494
The Presto CLI starts and displays the prompt ``presto>``.
9595

96-
For more information on the Presto CLI, see :doc:`Command Line Interface <cli>`.
96+
For more information, see :doc:`/clients/presto-cli`.
9797

9898
Deploy Presto on an Apple Silicon Mac using Homebrew
9999
----------------------------------------------------
@@ -192,4 +192,4 @@ To run the Presto CLI, run the following command:
192192

193193
The Presto CLI starts and displays the prompt ``presto>``.
194194

195-
For more information on the Presto CLI, see :doc:`Command Line Interface <cli>`.
195+
For more information, see :doc:`/clients/presto-cli`.

presto-docs/src/main/sphinx/release/release-0.54.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Release 0.54
66
the state of all nodes as seen by the coordinator's failure detector.
77
Access ``/v1/node`` to see all nodes, or ``/v1/node/failed`` to see failed nodes.
88

9-
* Prevent the :doc:`/installation/cli` from hanging when the server goes away.
9+
* Prevent the :doc:`/clients/presto-cli` from hanging when the server goes away.
1010

1111
* Add Hive connector ``hive-hadoop1`` for Apache Hadoop 1.x.
1212

presto-docs/src/main/sphinx/release/release-0.60.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ anymore.
1616
USE CATALOG and USE SCHEMA
1717
--------------------------
1818

19-
The :doc:`/installation/cli` now supports ``USE CATALOG`` and
19+
The :doc:`/clients/presto-cli` now supports ``USE CATALOG`` and
2020
``USE SCHEMA``.
2121

2222

presto-docs/src/main/sphinx/security/cli.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
CLI Kerberos Authentication
33
===========================
44

5-
The Presto :doc:`/installation/cli` can connect to a :doc:`Presto coordinator
6-
</security/server>` that has Kerberos authentication enabled.
5+
The :doc:`/clients/presto-cli` can connect to a Presto
6+
:doc:`coordinator with Kerberos authentication </security/server>` enabled.
77

88
Environment Configuration
99
-------------------------

0 commit comments

Comments
 (0)