[ https://issues.apache.org/jira/browse/HIVE-21034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16742060#comment-16742060 ]
Daniel Voros commented on HIVE-21034: ------------------------------------- Thank you both for your replies. Regarding safeguards I have two proposals: 1) Introduce the new schematool flag ({{-dropAllDatabases}}) as discussed above, but only do the deletion if an environment variable was set (e.g. {{ALLOW_SCHEMATOOL_UNSAFE=true}}) 2) Instead of extending schematool, introduce a new "tool", that can _not_ be invoked from the cli, only via a hadoop jar command (e.g. {{hadoop jar /path/to/hive-cli-*.jar org.apache.hive.some.package.DropDbTool}}) Since the second approach would also require the user to properly setup the HADOOP_CLASSPATH, I'd go with the first one. Please let me know what you think! > Add option to schematool to drop Hive databases > ----------------------------------------------- > > Key: HIVE-21034 > URL: https://issues.apache.org/jira/browse/HIVE-21034 > Project: Hive > Issue Type: Improvement > Reporter: Daniel Voros > Assignee: Daniel Voros > Priority: Major > > An option to remove all Hive managed data could be a useful addition to > {{schematool}}. > I propose to introduce a new flag {{-dropAllDatabases}} that would *drop all > databases with CASCADE* to remove all data of managed tables. -- This message was sent by Atlassian JIRA (v7.6.3#76005)