@VisibleForTesting
  HiveLock lockObject(TableMetadata metadata) {
    if (hiveLockEnabled(metadata, conf)) {
      return new MetastoreLock(conf, metaClients, catalogName, database, tableName);
    } else {
      return new NoLock();
    }
  }
Returns if the hive locking should be enabled on the table, or not.

<p>The decision is made like this:

<ol>
  <li>Table property value {@link TableProperties#HIVE_LOCK_ENABLED}
  <li>If the table property is not set then check the hive-site.xml property value {@link
      ConfigProperties#LOCK_HIVE_ENABLED}
  <li>If none of the above is enabled then use the default value {@link
      TableProperties#HIVE_LOCK_ENABLED_DEFAULT}
</ol>

@param properties Table properties to use
@param conf The hive configuration to use
@return if the hive engine related values should be enabled or not
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java