rdblue commented on a change in pull request #166: Update Hive Metastore tables 
for Spark
URL: https://github.com/apache/incubator-iceberg/pull/166#discussion_r279557115
 
 

 ##########
 File path: hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
 ##########
 @@ -126,7 +127,7 @@ public void commit(TableMetadata base, TableMetadata 
metadata) {
       // TODO add lock heart beating for cases where default lock timeout is 
too low.
       Table tbl;
       if (base != null) {
-        tbl = metaStoreClient.get_table(database, tableName);
+        tbl = metaClients.run(client -> client.getTable(database, tableName));
 
 Review comment:
   Line 111 (`base != current()`) only checks the currently-known metadata. If 
before a refresh the base metadata is already out of date, it fails early.
   
   After the lock is acquired, table metadata is refreshed using this call to 
`getTable` on line 130 (in the latest version). On line 148, this checks the 
metadata location that was fetched to ensure that it is the one that was 
expected.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to