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.

    1. java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main \
    2. tools reset-cluster \
    3. [--metadataStore] \
    4. [--segmentFiles] \
    5. [--taskLogs] \
    6. [--hadoopWorkingPath]

    or

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

    Usage documentation can be printed by running following command.

    1. $ java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main help tools reset-cluster
    2. NAME
    3. druid tools reset-cluster - Cleanup all persisted state from metadata
    4. and deep storage.
    5. SYNOPSIS
    6. druid tools reset-cluster [--all] [--hadoopWorkingPath]
    7. [--metadataStore] [--segmentFiles] [--taskLogs]
    8. OPTIONS
    9. --all
    10. delete all state stored in metadata and deep storage
    11. --hadoopWorkingPath
    12. delete hadoopWorkingPath
    13. --metadataStore
    14. delete all records in metadata storage
    15. --segmentFiles
    16. delete all segment files from deep storage
    17. --taskLogs
    18. delete all tasklogs