-
Notifications
You must be signed in to change notification settings - Fork 36
Additional logging for HiveMetadataPreservingTableOperations.java #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional logging for HiveMetadataPreservingTableOperations.java #62
Conversation
|
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 = ""; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveMetadataPreservingTableOperations.java
Outdated
Show resolved
Hide resolved
| boolean tableExists = metaClients.run(client -> client.tableExists(database, tableName)); | ||
| if (tableExists) { | ||
| tbl = metaClients.run(client -> client.getTable(database, tableName)); | ||
| logTable(tbl); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* 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]>
Adding additional debug logs to root cause an error where commit to update the metadata location property unintentionally modifies the schema of the table.