private boolean promptToConfirm() {
    System.out.print("This operation will delete ALL managed data in Hive. " +
            "Are you sure you want to continue (y/[n])?");
    Scanner scanner = new Scanner(System.in, "UTF-8");
    String input = scanner.nextLine();

    if ("y".equalsIgnoreCase(input) || "yes".equalsIgnoreCase(input)) {
      return true;
    }
    return false;
  }
Display "are you sure? y/n" on command line and return what the user has chosen
@return
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/schematool/SchemaToolTaskDrop.java