umustafi commented on a change in pull request #3451:
URL: https://github.com/apache/gobblin/pull/3451#discussion_r784301329



##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/metastore/HiveMetaStoreBasedRegister.java
##########
@@ -276,14 +276,16 @@ private boolean 
ensureHiveTableExistenceBeforeAlternation(String tableName, Stri
       Table table) throws TException, IOException{
     try (AutoCloseableHiveLock lock = this.locks.getTableLock(dbName, 
tableName)) {
       try {
-        if(!existsTable(dbName, tableName, client)) {
+        if (!existsTable(dbName, tableName, client)) {
           try (Timer.Context context = 
this.metricContext.timer(CREATE_HIVE_TABLE).time()) {
             client.createTable(getTableWithCreateTimeNow(table));
             log.info(String.format("Created Hive table %s in db %s", 
tableName, dbName));
             return true;
           }
         }
-      }catch (TException e) {
+      } catch (AlreadyExistsException ignore) {
+        // Table already exists, continue

Review comment:
       should we log this case?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to