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.
Upload the schema configuration to controller. If their is already a schema with same name, it will be updated.
All the options should be prefixed with -
(hyphen)
Option
Description
schemaFile
controllerHost
controllerHost on which to send the upload requests
controllerPort
controllerPort on which to send the upload requests
exec
If not specified, a dry run will be done but configs won't actually be uploaded.
Upload the table configuration to controller.
All the options should be prefixed with -
(hyphen)
Option
Description
tableConfigFile
schemaFile
controllerHost
controllerHost on which to send the upload requests
controllerPort
controllerPort on which to send the upload requests
exec
If not specified, a dry run will be done but configs won't actually be uploaded.
Add a new tenant to the server
All the options should be prefixed with -
(hyphen)
Option
Description
controllerHost
controllerHost on which to send the upload requests
controllerPort
controllerPort on which to send the upload requests
name
name of the tenant
role
where the tenant should reside. can be BROKER
or SERVER
instanceCount
total number of instances to assign to this tenant
offlineInstanceCount
(only applicable for SERVER
) total number of instances which can host offline tables belonging to this tenant
realTimeInstanceCount
(only applicable for SERVER
)total number of instances which can host realtime tables belonging to this tenant
exec
If not specified, a dry run will be done but configs won't actually be uploaded.
Lists all the segments which have invalid time interval. Only OFFLINE
segments are supported.
All the options should be prefixed with -
(hyphen)
Option
Description
zkAddress
comma seperated host:port string of zookeeper to connect
clusterName
name of the cluster to connect to. It can be thought of as a namespace inside zookeeper.
tableName
Comma separated list of tables to check for invalid segment intervals. By default all tables are checked.
This command changes the replicas of the table. The number of replicas are set from the latest available table config.
All the options should be prefixed with -
(hyphen)
Option
Description
zkAddress
comma seperated host:port string of zookeeper to connect
clusterName
name of the cluster to connect to. It can be thought of as a namespace inside zookeeper.
tableName
name of the table on which to perform operation
exec
If not specified, a dry run will be done but configs won't actually be uploaded.
Enable, Disable or Drop the table available in database.
All the options should be prefixed with -
(hyphen)
Option
Description
controllerHost
controllerHost on which to send the upload requests
controllerPort
controllerPort on which to send the upload requests
tableName
name of the table to modify
state
can be one of enable
, disable
or drop
Create segment files from the input file in local filesystem.
All the options should be prefixed with -
(hyphen)
Option
Description
dataDir
Directory containing input files
format
outDir
Local output directory to publish the segments
overwrite
Set to true
to overwrite segments of already present in the directory
tableConfigFile
schemaFile
readerConfigFile
retry
Number of retry attempts in case of failure
postCreationVerification
Set true
to verify the segment files post creation.
numThreads
Number of threads to use to execute the segment creation job
Convert the segment file from Pinot specific format to other data formats. Currently only CSV
, AVRO
and JSON
are supported.
All the options should be prefixed with -
(hyphen)
Option
Description
dataDir
directory containing the segment files. Only local filePaths are supported
outputDir
directory to put the converted segment files in.
outputFormat
format to output the files in. Can be one of CSV
, AVRO
or JSON
overwrite
set it to overwrite the files if already present in output directory
csvDelimiter
delimiter to use for CSV files. only applicable to CSV
csvListDelimiter
delimiter to use for list/array in CSV files. only applicable to CSV
csvWithHeader
set to print CSV header in output file. Default is false
.
Delete the cluster namespace from zookeeper.
All the options should be prefixed with -
(hyphen)
Option
Description
clusterName
name of the cluster to delete
zkAddress
Comma seperated host:port list of zookeeper from which to delete the cluster namespace
Run job to consume batch or streaming data and push it to Pinot.
All the options should be prefixed with -
(hyphen)
Option
Description
jobSpecFile
propertyFile
Path to properties file. This file can contain properties related to ingestion job or template paramaters
values
list of string containing the values to replace template parameters with
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.
Field
Description