hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveQueryExecutor.java
public String executeDescribeDatabase(String dbName) throws StageException {
    String sql = buildDescribeDatabase(dbName);

    return executeQuery(sql, rs -> {
      if(!rs.next()) {
        throw new HiveStageCheckedException(Errors.HIVE_35, "Database doesn't exists.");
      }

      return HiveMetastoreUtil.stripHdfsHostAndPort(rs.getString(RESULT_SET_LOCATION));
    });
  }
public String executeDescribeDatabase(String dbName) throws StageException {
    String sql = buildDescribeDatabase(dbName);

    return executeQuery(sql, rs -> {
      if(!rs.next()) {
        throw new HiveStageCheckedException(Errors.HIVE_35, "Database doesn't exists.");
      }

      return HiveMetastoreUtil.stripHdfsHostAndPort(rs.getString(RESULT_SET_LOCATION));
    });
  }
public String executeDescribeDatabase ( String dbName ) throws StageException { String sql = buildDescribeDatabase ( dbName ) ; return executeQuery ( sql , rs -> { if ( ! rs . next ( ) ) { throw new HiveStageCheckedException ( Errors . HIVE_35 , "Database doesn't exists." ) ; } return HiveMetastoreUtil . stripHdfsHostAndPort ( rs . getString ( RESULT_SET_LOCATION ) ) ; } ) ; }
Returns location for given database.

@param dbName Database name
@return Path where the database is stored
@throws StageException in case of any {@link SQLException}
Returns location for given database .