SourabhBadhya commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127915943


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java:
##########
@@ -66,12 +66,7 @@ public void init(AtomicBoolean stop) throws Exception {
   }
 
   @Override Table resolveTable(CompactionInfo ci) throws MetaException {
-    try {
-      return getMSForConf(conf).getTable(getDefaultCatalog(conf), ci.dbname, 
ci.tableName);
-    } catch (MetaException e) {
-      LOG.error("Unable to find table " + ci.getFullTableName() + ", " + 
e.getMessage());
-      throw e;
-    }
+    return CompactorUtil.resolveTable(conf, ci.dbname, ci.tableName);

Review Comment:
   Its also a utility method used across Initiator and worker. To reduce common 
code, I made it use the static function in `CompactorUtil`. Also removing this 
and using `CompactorUtil.resolveTable`, will make tests use static mocking 
which is undesirable.
   
   



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


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

Reply via email to