...
It can be installed on Distributed CDAP, in which case it will be installed either in /opt/cdap/cli
or, in the case of Cloudera Manager, opt/cloudera/parcels/cdap/cli/
.
You can use the CLI in two modes:
...
Linux:
$./bin/cdap cli
Windows:
> .\bin\cdap.bat cli
Distributed CDAP:
$ /opt/cdap/cli/bin/cdap cli
Cloudera Manager clusters:$ /opt/cloudera/parcels/cdap/cli/bin/cdap cli
The executable should bring you into a shell, with a prompt similar to:
...
The CDAP CLI uses the following options:
Option | Argument | Description |
---|---|---|
--autoconnect | true|false | If set to true, try provided connection (from uri) |
--debug | n/a | Print exception stack traces. |
--help | n/a | Print the usage message. |
--link | uri | CDAP instance URI to interact with in the format "[http[s]://]<hostname>[:<port>][/<path>]" |
--namespace | namespace_name | CDAP Instance Namespace to connect to. Defaults to “default”. |
--retries | number_of_retries | Set the number of times to retry contacting a service if it is determined to be unavailable. Defaults to 0. |
--script | script_name | Execute a file containing a series of CLI commands, line-by-line. |
--timeout | read_timeout_in_seconds | Set HTTP read timeout of the CLI in seconds. |
--verify-ssl | true|false | If "true", verify SSL certificate when making requests. Defaults to "true". |
Info |
---|
Starting in CDAP 6.1.4, the option |
...
The command
cli render as <table-renderer>
(from the General commands) sets how table data is rendered. Valid options are eitheralt
(the default) orcsv
. Because thealt
option might split a cell into multiple lines, you might need to usecsv
if you want to copy and paste the results into another application or include in a message.With
cli render as alt
(the default), a command such aslist apps
will be output as:Code Block +================================+ | app id | description | +=============+==================+ | PurchaseApp | Some description | +=============+==================+
With
cli render as csv
, the samelist apps
will be output as:Code Block app id,description PurchaseApp,Some description
The command
connect-link
(from the General commands) allows you to connect to a CDAP instance.The command
use namespace
(from the Namespace commands) allows you to set the namespace used with all subsequent commands. By default, all sessions start in thedefault
namespace.