akshat0395 commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127398769
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java:
##########
@@ -133,6 +150,24 @@ public static List<Partition>
getPartitionsByNames(HiveConf conf, String dbName,
}
}
+ public static Database resolveDatabase(HiveConf conf, String dbName) throws
MetaException, NoSuchObjectException {
+ try {
+ return
getMSForConf(conf).getDatabase(MetaStoreUtils.getDefaultCatalog(conf), dbName);
+ } catch (NoSuchObjectException e) {
+ LOG.error("Unable to find database {}, {}", dbName, e.getMessage());
+ throw e;
+ }
+ }
+
+ public static Table resolveTable(HiveConf conf, String dbName, String
tableName) throws MetaException {
+ try {
+ return
getMSForConf(conf).getTable(MetaStoreUtils.getDefaultCatalog(conf), dbName,
tableName);
+ } catch (MetaException e) {
+ LOG.error("Unable to find database {}, {}", dbName, e.getMessage());
Review Comment:
This method is resolving for table, This log should be `Unable to find Table
{}, {}`, tableName
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java:
##########
@@ -74,6 +77,20 @@ static Runnable unchecked(ThrowingRunnable<?> r) {
}
}
+ public interface ThrowingFunction<T, R, E extends Exception> {
Review Comment:
Can we please add comments to this method to reduce the cognitive complexity
of this method
--
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]