public Path getDefaultDatabasePath(String dbName, boolean inExternalWH) throws MetaException {
    if (inExternalWH) {
      if (dbName.equalsIgnoreCase(DEFAULT_DATABASE_NAME)) {
        return getWhRootExternal();
      }
      return new Path(getWhRootExternal(), dbName.toLowerCase() + DATABASE_WAREHOUSE_SUFFIX);
    } else {
      if (dbName.equalsIgnoreCase(DEFAULT_DATABASE_NAME)) {
        return getWhRoot();
      }
      return new Path(getWhRoot(), dbName.toLowerCase() + DATABASE_WAREHOUSE_SUFFIX);
    }
  }
Get the managed tables path specified by the database.  In the case of the default database the root of the
warehouse is returned.
@param db database to get the path of
@return path to the database directory
@throws MetaException when the file path cannot be properly determined from the configured
file system.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java