src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/HsqlDriver.java
public void rebuildTable(String table) throws SQLException {
    switch (table) {
      case "LOGIN":
        try (PreparedStatement dropLogin = con.prepareStatement("DROP TABLE LOGIN IF EXISTS")) {
          dropLogin.execute();
        }
        return;
      case "HISTORY":
        try (PreparedStatement dropHistory = con.prepareStatement("DROP TABLE HISTORY IF EXISTS")) {
          dropHistory.execute();
          createTable();
        }
        return;
      default:
        throw new IllegalArgumentException("No such table: " + table + " exists in embedded DB.");
    }
  }
/**
   * Rebuild embedded tables.
   *
   * @param table name of the table to rebuild
   * @throws SQLException error rebuilding table
   */
Rebuild embedded tables.
@param table name of the table to rebuild
@throws SQLException error rebuilding table
Rebuild embedded tables . @param table name of the table to rebuild @throws SQLException error rebuilding table
public void rebuildTable(String table) throws SQLException {
    switch (table) {
      case "LOGIN":
        try (PreparedStatement dropLogin = con.prepareStatement("DROP TABLE LOGIN IF EXISTS")) {
          dropLogin.execute();
        }
        return;
      case "HISTORY":
        try (PreparedStatement dropHistory = con.prepareStatement("DROP TABLE HISTORY IF EXISTS")) {
          dropHistory.execute();
          createTable();
        }
        return;
      default:
        throw new IllegalArgumentException("No such table: " + table + " exists in embedded DB.");
    }
  }
public void rebuildTable ( String table ) throws SQLException { switch ( table ) { case "LOGIN" : try ( PreparedStatement dropLogin = con . prepareStatement ( "DROP TABLE LOGIN IF EXISTS" ) ) { dropLogin . execute ( ) ; } return ; case "HISTORY" : try ( PreparedStatement dropHistory = con . prepareStatement ( "DROP TABLE HISTORY IF EXISTS" ) ) { dropHistory . execute ( ) ; createTable ( ) ; } return ; default : throw new IllegalArgumentException ( "No such table: " + table + " exists in embedded DB." ) ; } }
Rebuild embedded tables.
Rebuild embedded tables .