Command-Line Interface (CLI)
Pinot provides a rich CLI to perform almost every operation on the cluster. You can execute all the commands using the pinot-admin.sh
. The script is located in the bin/
directory of the Pinot binary distribution or /opt/pinot/bin
in docker container.
The following commands are supported by the admin script.
Add Schema
Upload the schema configuration to controller. If their is already a schema with same name, it will be updated.
Supported Options
All the options should be prefixed with -
(hyphen)
Add Table
Upload the table configuration to controller.
Supported Options
All the options should be prefixed with -
(hyphen)
Add Tenant
Add a new tenant to the server
Supported Options
All the options should be prefixed with -
(hyphen)
Check Offline Segment Intervals
Lists all the segments which have invalid time interval. Only OFFLINE
segments are supported.
Supported Options
All the options should be prefixed with -
(hyphen)
Change Num Replicas
This command changes the replicas of the table. The number of replicas are set from the latest available table config.
Supported Options
All the options should be prefixed with -
(hyphen)
Change Table State
Enable, Disable or Drop the table available in database.
Supported Options
All the options should be prefixed with -
(hyphen)
Create Segment
Create segment files from the input file in local filesystem.
Supported Options
All the options should be prefixed with -
(hyphen)
Convert Pinot Segment
Convert the segment file from Pinot specific format to other data formats. Currently only CSV
, AVRO
and JSON
are supported.
Supported Options
All the options should be prefixed with -
(hyphen)
Delete Cluster
Delete the cluster namespace from zookeeper.
All the options should be prefixed with -
(hyphen)
Launch Data Ingestion Job
Run job to consume batch or streaming data and push it to Pinot.
Supported Options
All the options should be prefixed with -
(hyphen)
Merge/Rollup Segments
Perform operations similar to the Minion Merge Rollup Task, where multiple segments can be merged based on the provided spec.
This command is mostly for debugging purpose. Use Minion Merge Rollup Task for production.
Fields within the spec file
Move Replica Group
Command to migrate a subset of replica group from current servers to the provided destination servers. This command is intended to be run multiple times to migrate all the replicas of a table to the destination servers (if intended).
Supported Options
All the options should be prefixed with -
(hyphen)
Operate Cluster Config
Modify cluster level configs for pinot. These are the configs which are applicable to all nodes in the cluster.
Supported Options
All the options should be prefixed with -
(hyphen)
Post Query
Execute a SQL query on the cluster.
Supported Options
All the options should be prefixed with -
(hyphen)
Rebalance Table
Rebalance a table i.e. reassign instances and segments for a table in the cluster.
For segment reassignment, the following modes are offered:
With-downtime rebalance
: the IdealState is replaced with the target segment assignment in one go and there are no guarantees around replica availability. This mode returns immediately without waiting for ExternalView to reach the target segment assignment. Disabled tables will always be rebalanced with downtime.No-downtime rebalance
: care is taken to ensure that the configured number of replicas of any segment are available (ONLINE or CONSUMING) at all times. This mode returns after ExternalView reaching the target segment assignment. In the edge case scenarios mentioned later, ifbest-efforts
is disabled, rebalancer will fail the rebalance because the no-downtime contract cannot be achieved, and table might end up in a middle stage. User needs to check the rebalance result, solve the issue, and run the rebalance again if necessary. Ifbest-efforts
is enabled, rebalancer will log a warning and continue the rebalance, but the no-downtime contract will not be guaranteed. Downtime can occur in the following edge case scenarios -Segment falls into ERROR state in ExternalView -> with best-efforts, count ERROR state as good state.
ExternalView has not converged within the maximum wait time -> with best-efforts, continue to the next stage
If the controller that handles the rebalance goes down/restarted, the rebalance isn't automatically resumed by other controllers
Supported Options
All the options should be prefixed with -
(hyphen)
Start Broker
Start a broker instance on host
Supported Options
All the options should be prefixed with -
(hyphen)
Start Controller
Start a controller instance on host
Supported Options
All the options should be prefixed with -
(hyphen)
Start Server
Start a server instance on host
Supported Options
All the options should be prefixed with -
(hyphen)
Start Service Manager
Start multiple Pinot processes with all the default configurations using a single command.
Supported Options
All the options should be prefixed with -
(hyphen)
Show Cluster Info
Show all the available clusters namespaces along with metadata
Supported Options
All the options should be prefixed with -
(hyphen)
Stop Process
Stop all the processes of the specified types running on the host.
Supported Options
All the options should be prefixed with -
(hyphen)
Upload Segments
Compress and upload segment files to server.
Supported Options
All the options should be prefixed with -
(hyphen)
Validate Config
Validate the table configs and schema present in Zookeeper.
Supported Options
All the options should be prefixed with -
(hyphen)
Validate Segment
Compares Helix Ideal state and External view for specified table prefixes.
Supported Options
All the options should be prefixed with -
(hyphen)
Verify Cluster State
Verify if all the tables in the cluster have same Ideal State and External View.
Supported Options
All the options should be prefixed with -
(hyphen)
Last updated