diff --git a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveMetadataPreservingTableOperations.java b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveMetadataPreservingTableOperations.java index 3c6a4f7677..1596b1f858 100644 --- a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveMetadataPreservingTableOperations.java +++ b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveMetadataPreservingTableOperations.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.Objects; import java.util.Optional; -import java.util.stream.Collectors; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.StatsSetupConst; import org.apache.hadoop.hive.metastore.HiveMetaStoreClient; @@ -79,20 +78,6 @@ protected HiveMetadataPreservingTableOperations(Configuration conf, HiveClientPo this.tableName = table; } - private static void logTable(Table table) { - String columns = ""; - try { - columns = table.getSd().getCols().stream().map(column -> column.getName() + " " + column.getType()) - .collect(Collectors.joining("\n")); - } catch (Throwable throwable) { - LOG.debug("Encountered {} while fetching columns for {}.{}", throwable.getMessage(), - table.getDbName(), table.getTableName(), throwable); - return; - } - LOG.debug("Table: {}.{}", table.getDbName(), table.getTableName()); - LOG.debug("Columns: \n{}", columns); - } - @Override protected void doRefresh() { String metadataLocation = null; @@ -154,8 +139,6 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) { boolean tableExists = metaClients.run(client -> client.tableExists(database, tableName)); if (tableExists) { tbl = metaClients.run(client -> client.getTable(database, tableName)); - LOG.debug("Following table has been fetched from metastore:"); - logTable(tbl); } else { final long currentTimeMillis = System.currentTimeMillis(); tbl = new Table(tableName, @@ -234,9 +217,6 @@ void persistTableVerbal(Table tbl, boolean tableExists) throws TException, Inter EnvironmentContext envContext = new EnvironmentContext( ImmutableMap.of(StatsSetupConst.DO_NOT_UPDATE_STATS, StatsSetupConst.TRUE) ); - LOG.debug("Updating the metadata location of the following table:"); - logTable(tbl); - LOG.debug("Metadata Location: {}", tbl.getParameters().get(METADATA_LOCATION_PROP)); ALTER_TABLE.invoke(client, database, tableName, tbl, envContext); return null; });