RussellSpitzer commented on a change in pull request #2328:
URL: https://github.com/apache/iceberg/pull/2328#discussion_r592630726



##########
File path: 
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -199,25 +201,63 @@ protected void doCommit(TableMetadata base, TableMetadata 
metadata) {
       setHmsTableParameters(newMetadataLocation, tbl, metadata.properties(), 
removedProps, hiveEngineEnabled);
 
       persistTable(tbl, updateHiveTable);
-      threw = false;
     } catch (org.apache.hadoop.hive.metastore.api.AlreadyExistsException e) {
-      throw new AlreadyExistsException("Table already exists: %s.%s", 
database, tableName);
+      commitFailed = true;
+      throw new CommitFailedException("Table already exists: %s.%s", database, 
tableName);
 
     } catch (TException | UnknownHostException e) {
       if (e.getMessage() != null && e.getMessage().contains("Table/View 
'HIVE_LOCKS' does not exist")) {
+        commitFailed = true;
         throw new RuntimeException("Failed to acquire locks from metastore 
because 'HIVE_LOCKS' doesn't " +

Review comment:
       I meant for this specific message, for the general case we don't know 
but if we get the Hive Locks error doesn't that mean we know we couldn't commit?




----------------------------------------------------------------
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]



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

Reply via email to