public List<String> getAllDatabases() throws HiveException {
    try {
      return getMSC().getAllDatabases();
    } catch (Exception e) {
      throw new HiveException(e);
    }
  }
Get all existing database names.

@return List of database names.
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java