Problem: Hive CLI turned off suddenly, and I cannot start Hive CLI again
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=/mnt/storage/DATA/hadoop/metastore_db;create=true, username = APP
Diagnosis: since Derby database allow only 1 connection to its database, it creates a *.lck in the folder databaseName above. So to this folder, and delete those *.lck file.
After I deleted dbex.lck and db.lck, then
hive can start as usual.