Skip to content

Latest commit

 

History

History
238 lines (133 loc) · 7.62 KB

ECCTOOL.md

File metadata and controls

238 lines (133 loc) · 7.62 KB

ecctool

ecctool is a command line utility which can be used to perform actions towards a local ecChronos instance. The actions are implemented in form of subcommands with arguments. All visualization is displayed in form of human-readable tables.

usage: ecctool [-h]
               {repairs,schedules,run-repair,repair-info,start,stop,status}
               ...

-h, --help

show this help message and exit

ecctool repair-info

Get information about repairs for tables. The repair information is based on repair history, meaning that both manual repairs and schedules will contribute to the repair information. This subcommand requires the user to provide either –since or –duration if –keyspace and –table is not provided. If repair info is fetched for a specific table using –keyspace and –table, the duration will default to the table’s GC_GRACE_SECONDS.

usage: ecctool repair-info [-h] [-k KEYSPACE] [-t TABLE] [-s SINCE]
                           [-d DURATION] [--local] [-u URL] [-l LIMIT]

-h, --help

show this help message and exit

-k <keyspace>, --keyspace <keyspace>

Show repair information for all tables in the specified keyspace.

-t <table>, --table <table>

Show repair information for the specified table. Keyspace argument -k or –keyspace becomes mandatory if using this argument.

-s <since>, --since <since>

Show repair information since the specified date to now. Date must be specified in ISO8601 format. The time-window will be since to now. Mandatory if –duration or –keyspace and –table is not specified.

-d <duration>, --duration <duration>

Show repair information for the duration. Duration can be specified as ISO8601 format or as simple format in form: 5s, 5m, 5h, 5d. The time-window will be now-duration to now. Mandatory if –since or –keyspace and –table is not specified.

--local

Show repair information only for the local node.

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.

-l <limit>, --limit <limit>

Limits the number of rows printed in the output. Specified as a number, -1 to disable limit.

ecctool repairs

Show the status of all manual repairs. This subcommand has no mandatory parameters.

usage: ecctool repairs [-h] [-k KEYSPACE] [-t TABLE] [-u URL] [-i ID]
                       [-l LIMIT] [--hostid HOSTID]

-h, --help

show this help message and exit

-k <keyspace>, --keyspace <keyspace>

Show repairs for the specified keyspace. This argument is mutually exclusive with -i and –id.

-t <table>, --table <table>

Show repairs for the specified table. Keyspace argument -k or –keyspace becomes mandatory if using this argument. This argument is mutually exclusive with -i and –id.

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.

-i <id>, --id <id>

Show repairs matching the specified ID. This argument is mutually exclusive with -k, –keyspace, -t and –table.

-l <limit>, --limit <limit>

Limits the number of rows printed in the output. Specified as a number, -1 to disable limit.

--hostid <hostid>

Show repairs for the specified host id. The host id corresponds to the Cassandra instance ecChronos is connected to.

ecctool run-repair

Run a manual repair. The manual repair will be triggered in ecChronos. EcChronos will perform repair through Cassandra JMX interface. This subcommand has no mandatory parameters.

usage: ecctool run-repair [-h] [-u URL] [--local] [-r REPAIR_TYPE]
                          [-k KEYSPACE] [-t TABLE]

-h, --help

show this help message and exit

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.

--local

Run repair for the local node only, i.e repair will only be performed for the ranges that the local node is a replica for.

-r <repair_type>, --repair_type <repair_type>

The type of the repair, possible values are ‘vnode’, ‘parallel_vnode’, ‘incremental’

-k <keyspace>, --keyspace <keyspace>

Run repair for the specified keyspace. Repair will be run for all tables within the keyspace with replication factor higher than 1.

-t <table>, --table <table>

Run repair for the specified table. Keyspace argument -k or –keyspace becomes mandatory if using this argument.

ecctool schedules

Show the status of schedules. This subcommand has no mandatory parameters.

usage: ecctool schedules [-h] [-k KEYSPACE] [-t TABLE] [-u URL] [-i ID] [-f]
                         [-l LIMIT]

-h, --help

show this help message and exit

-k <keyspace>, --keyspace <keyspace>

Show schedules for the specified keyspace. This argument is mutually exclusive with -i and –id.

-t <table>, --table <table>

Show schedules for the specified table. Keyspace argument -k or –keyspace becomes mandatory if using this argument. This argument is mutually exclusive with -i and –id.

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.

-i <id>, --id <id>

Show schedules matching the specified ID. This argument is mutually exclusive with -k, –keyspace, -t and –table.

-f, --full

Show full schedules, can only be used with -i or –id. Full schedules include schedule configuration and repair state per vnode.

-l <limit>, --limit <limit>

Limits the number of rows printed in the output. Specified as a number, -1 to disable limit.

ecctool start

Start the ecChronos service. This subcommand has no mandatory parameters.

usage: ecctool start [-h] [-f] [-p PIDFILE]

-h, --help

show this help message and exit

-f, --foreground

Start the ecChronos instance in foreground mode (exec in current terminal and log to stdout)

-p <pidfile>, --pidfile <pidfile>

Start the ecChronos instance and store the pid in the specified pid file.

ecctool status

View status of ecChronos instance. This subcommand has no mandatory parameters.

usage: ecctool status [-h] [-u URL]

-h, --help

show this help message and exit

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.

ecctool stop

Stop the ecChronos instance. Stopping of ecChronos is done by using kill with SIGTERM signal (same as kill in shell) for the pid. This subcommand has no mandatory parameters.

usage: ecctool stop [-h] [-p PIDFILE]

-h, --help

show this help message and exit

-p <pidfile>, --pidfile <pidfile>

Stops the ecChronos instance by pid fetched from the specified pid file.

Examples

For example usage and explanation about output refer to ECCTOOL_EXAMPLES.md

ecctool running-job

Show which (if any) job that is currently running.

usage: ecctool running-job [-h] [-u URL]

Show which (if any) job is currently running

optional arguments:
  -h, --help         show this help message and exit
  -u URL, --url URL  The ecChronos host to connect to, specified in the format http://<host>:<port>.

-h, --help

show this help message and exit

-u <url>, --url <url>

The ecChronos host to connect to, specified in the format http://<host>:<port>.