Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
});
Expand Down