nodetool resetlocalschema
Where is the cassandra-env.sh
file?
The location of the cassandra-env.sh
file depends on the type of installation:
Installation Type | Location |
---|---|
Package installations + Installer-Services installations |
|
Tarball installations + Installer-No Services installations |
|
Reset the node’s local schema and resynchronizes.
Synopsis
nodetool [options] resetlocalschema [args]
Tarball and Installer No-Services path:
<installation_location>/resources/cassandra/bin
Short | Long | Description |
---|---|---|
|
|
Hostname or IP address. |
|
|
Port number. |
|
|
Password file path. |
|
|
Password. |
|
|
Remote JMX agent username. |
|
Separates an option from an argument that could be mistaken for an option. |
|
Description
Normally, this command is used to rectify schema disagreements on different nodes. It can be useful if table schema changes have generated too many tombstones, on the order of 100,000s.
nodetool resetlocalschema
drops the schema information of the local node and resynchronizes the schema from another node.
To drop the schema, the tool truncates all the system schema tables.
The node temporarily loses metadata about the tables on the node but rewrites the information from another node.
If the node is experiencing problems with too many tombstones, the truncation of the tables eliminates the tombstones.
This command is useful when you have one node that is out of sync with the cluster. The system schema tables must have another node from which to fetch the tables. It is not useful when all or many of your nodes are in an incorrect state. If there is only one node in the cluster (replication factor of 1) — it does not perform the operation, because another node from which to fetch the tables does not exist. Run the command on the node experiencing difficulty.