private void deleteOrphanFiles(Table icebergTable, long timestampMillis, int numThreads) {
    ExecutorService deleteExecutorService = null;
    try {
      if (numThreads > 0) {
        LOG.info("Executing delete orphan files on iceberg table {} with {} threads", icebergTable.name(), numThreads);
        deleteExecutorService = IcebergTableUtil.newDeleteThreadPool(icebergTable.name(),
            numThreads);
      }

      HiveIcebergDeleteOrphanFiles deleteOrphanFiles = new HiveIcebergDeleteOrphanFiles(conf, icebergTable);
      deleteOrphanFiles.olderThan(timestampMillis);
      if (deleteExecutorService != null) {
        deleteOrphanFiles.executeDeleteWith(deleteExecutorService);
      }
      DeleteOrphanFiles.Result result = deleteOrphanFiles.execute();
      LOG.debug("Cleaned files {} for {}", result.orphanFileLocations(), icebergTable);
    } finally {
      if (deleteExecutorService != null) {
        deleteExecutorService.shutdown();
      }
    }
  }
Iceberg's optimistic concurrency control fails to provide means for IOW and Insert operations isolation.
Use `hive.txn.ext.locking.enabled` config to create Hive locks in order to guarantee data consistency.
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java