Skip to main content

reset-cluster tool

The reset-cluster tool can be used to completely wipe out Apache Druid cluster state stored on Metadata and Deep storage. This is intended to be used in dev/test environments where you typically want to reset the cluster before running the test suite. reset-cluster automatically figures out necessary information from Druid cluster configuration. So the java classpath used in the command must have all the necessary druid configuration files.

It can be run in one of the following ways.

java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main \
tools reset-cluster \
[--metadataStore] \
[--segmentFiles] \
[--taskLogs] \


java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main \
tools reset-cluster \

Usage documentation can be printed by running following command.

$ java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main help tools reset-cluster

druid tools reset-cluster - Cleanup all persisted state from metadata
and deep storage.

druid tools reset-cluster [--all] [--hadoopWorkingPath]
[--metadataStore] [--segmentFiles] [--taskLogs]

delete all state stored in metadata and deep storage

delete hadoopWorkingPath

delete all records in metadata storage

delete all segment files from deep storage

delete all tasklogs