private String getNameOrID(ResultSet res, int nameInx, int idInx) throws SQLException {
    String itemName = res.getString(nameInx);
    return  (itemName == null || itemName.isEmpty()) ? "ID: " + res.getString(idInx) : "Name: " + itemName;
  }
Check if the location is valid for the given entity.
@param entity          the entity to represent a database, partition or table
@param entityLocation  the location
@param defaultServers  a list of the servers that the location needs to match.
                       The location host needs to match one of the given servers.
                       If empty, then no check against such list.
@return true if the location is valid
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/schematool/SchemaToolTaskValidate.java