Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
confluent local¶
Description¶
Use the confluent local
commands to try out Confluent Platform by running a single-node instance locally on your machine.
Keep in mind, these commands require Java to run, as described in Tarball installation.
Important
The confluent local commands are intended for a single-node development environment and are not suitable for a production environment. The data that are produced are transient and are intended to be temporary. For production-ready workflows, see Install and Upgrade Confluent Platform.
confluent local: Manage a local Confluent Platform development environment.
Usage: confluent local <command> [<subcommand>] [<parameters>]
These are the available commands:
acl Specify acl for a service.
config Configure a connector.
consume Consume data from topics
current Get the path of the data and logs of the services managed by the current confluent run.
Override default setting with "CONFLUENT_CURRENT" environment variable.
demo Run demos provided in GitHub repo https://github.com/confluentinc/examples
destroy Delete the data and logs of the current confluent run.
list List available services.
load Load a connector.
log Read or tail the log of a service.
produce Produce data to topics
start Start all services or a specific service along with its dependencies
status Get the status of all services or the status of a specific service along with its dependencies.
stop Stop all services or a specific service along with the services depending on it.
top Track resource usage of a service.
unload Unload a connector.
version Print the Confluent Platform flavor and version or the individual version of a service.
'confluent local help' lists available commands. See 'confluent local help <command>' to read about a
specific command.
Here are the available confluent local
commands
Command | Description |
---|---|
confluent local acl | Specify ACL for a service. |
confluent local config | Configure a connector. |
confluent local consume | Consume data from topics. |
confluent local current | Print the filesystem path of the data and logs of the services managed by
the current confluent local command. |
confluent local demo | Run demos provided in GitHub repo https://github.com/confluentinc/examples. |
confluent local destroy | Delete the data and logs of the current Confluent Platform run. |
confluent local list | List all available services or plugins. |
confluent local load | Load a connector. |
confluent local log | Read or tail the log of a service. |
confluent local produce | Produce data to topics. |
confluent local start | Start all services or a specific service along with its dependencies. |
confluent local status | Get the status of all services or the status of a specific service and its dependencies. |
confluent local stop | Stop all services or a specific service its dependent services. |
confluent local top | View service resource usage. |
confluent local unload | Unload a connector. |
confluent local version | Print the Confluent CLI version. |
Tip
You must either specify the path for each Confluent CLI confluent local
command invocation, export the
path as an environment variable for each terminal session, or set the path to your Confluent Platform installation in your
shell profile. For example:
cat ~/.bash_profile
export CONFLUENT_HOME=<path-to-confluent>
export PATH="${CONFLUENT_HOME}/bin:$PATH"
Environment Variables¶
The confluent local
commands support the CONFLUENT_CURRENT
environment
variable, which can be set dynamically. For more information, see
Installing and Configuring the CLI. To configure properties for specific services through an
environment variable using confluent local
commands, use the given prefix
for the corresponding service provided in the following table.
Service | Prefix |
---|---|
ZooKeeper | $ZOOKEEPER_ |
Apache Kafka® | $KAFKA_ |
Schema Registry | $SCHEMA_REGISTRY_ |
REST Proxy | $KAFKAREST_ |
Kafka Connect | $CONNECT_ |
For example, to set the system property
-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf
when starting
Kafka Connect locally, run the command:
export CONNECT_OPTS="-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf"
confluent local start connect --path <path-to-confluent>
To set the same system property when invoking Kafka core, run the following command:
export KAFKA_OPTS="-Djava.security.auth.login.config=/tmp/kafka_client_jaas.conf"
confluent local start kafka --path <path-to-confluent>
Note that the Kafka, Kafka Connect, and ZooKeeper startup scripts use variables
prefixed with $KAFKA_
(for example, $KAFKA_OPTS
and
$KAFKA_LOG4J_OPTS
). However, the Confluent CLI confluent local
commands for these services use a service-specific prefix to distinguish the
service to which the variables apply (as shown in the table above).
Logging¶
You can specify a custom location to store the CLI data and logs. By default the Confluent CLI stores its data and logs in your platform’s temporary directory.
Tip
You can check the current data and log location with the confluent local current
command.
Create a directory:
mkdir <path-to-confluent>/var
Set the path to your directory:
export CONFLUENT_CURRENT=<path-to-confluent>/var