@VisibleForTesting
  @Override
  public int getNumLocks() {
    return Objects.requireNonNull(
        jdbcResource.getJdbcTemplate().queryForObject("SELECT COUNT(*) FROM \"HIVE_LOCKS\"", new MapSqlParameterSource(), Integer.TYPE),
        "This never should be null, it's just to suppress warnings");
  }
TODO: remove in future, for testing only, do not use.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java