Skip to content

Conversation

@nagarathnam200
Copy link

Adding additional debug logs to root cause an error where commit to update the metadata location property unintentionally modifies the schema of the table.

@nagarathnam200
Copy link
Author

Tested the changes by running TestHiveMetadataPreservingCatalog with debug logging enabled.

boolean tableExists = metaClients.run(client -> client.tableExists(database, tableName));
if (tableExists) {
tbl = metaClients.run(client -> client.getTable(database, tableName));
String columns = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be wrapped into a helper function (to log column names from table sd) since the code-block seems to be identical ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

boolean tableExists = metaClients.run(client -> client.tableExists(database, tableName));
if (tableExists) {
tbl = metaClients.run(client -> client.getTable(database, tableName));
logTable(tbl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we print one more line before each logTable call which provides some context so that the log lines are clearer?
Something along the lines of Fetched table from metastore and Updating table in metastore?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@shardulm94 shardulm94 merged commit f1ec726 into linkedin:master Mar 31, 2021
rzhang10 pushed a commit to rzhang10/iceberg that referenced this pull request Apr 29, 2021
rzhang10 added a commit that referenced this pull request May 7, 2021
* Hive Metadata Scan: Merge Hive and Avro schemas to fix datatype inconsistencies (#57)

Hive Metadata Scan: Fix Hive primitive to Avro logical type conversion (#58)

Hive Metadata Scan: Fix support for Hive timestamp type (#61)

Co-authored-by: Raymond Zhang <[email protected]>
Co-authored-by: Shardul Mahadik <[email protected]>

* Hive Catalog: Additional logging for HiveMetadataPreservingTableOperations (#62)

* Stop using serdeToFileFormat to unblock formats other than Avro or Orc (#64)

* Stop using serdeToFileFormat to unblock formats other than Avro or Orc

* Fix style check

* Spark: Allow reading timestamp without timezone

Cherry-picked PR 48: Spark: Allow reading timestamp without time zone

Fix style and refactor read-timestamp-without-zone option to constant after rebase

Co-authored-by: Shardul Mahadik <[email protected]>
Co-authored-by: nagarathnam200 <[email protected]>
rzhang10 pushed a commit to rzhang10/iceberg that referenced this pull request May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants