SourabhBadhya commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127595407
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/handler/TaskHandler.java:
##########
@@ -58,12 +55,7 @@ public abstract class TaskHandler {
public abstract List<Runnable> getTasks() throws MetaException;
protected Table resolveTable(String dbName, String tableName) throws
MetaException {
- try {
- return getMSForConf(conf).getTable(getDefaultCatalog(conf), dbName,
tableName);
- } catch (MetaException e) {
- LOG.error("Unable to find table {}.{}, {}", dbName, tableName,
e.getMessage());
- throw e;
- }
+ return CompactorUtil.resolveTable(conf, dbName, tableName);
Review Comment:
I think it's better to keep a utility method for fetching Table objects in
the generic class TaskHandler. Provides an easy way to test things out.
The cache is created in MetastoreCompactorThread and it's passed around to
all required TaskHandlers so that it can be used.
See this and its usages
-https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetadataCache.java
--
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]