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


##########
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:
   Nice catch. Modified accordingly. Done.



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