veghlaci05 commented on code in PR #3513:
URL: https://github.com/apache/hive/pull/3513#discussion_r963478641


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -259,15 +268,32 @@ private void scheduleCompactionIfRequired(CompactionInfo 
ci, Table t, Partition
     }
   }
 
-  private Table resolveTableAndCache(CompactionInfo ci) throws MetaException {
-    if (tableCache.isPresent()) {
+  private String getPoolName(CompactionInfo ci, Table t) throws Exception {
+    String poolName = 
t.getParameters().get(Constants.HIVE_COMPACTOR_WORKER_POOL);

Review Comment:
   t should not be null (`resolveTable()` throws an exception instead of 
returning null). However, the parameters field is marked as nullable so I added 
a null check for it.



##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -259,15 +268,32 @@ private void scheduleCompactionIfRequired(CompactionInfo 
ci, Table t, Partition
     }
   }
 
-  private Table resolveTableAndCache(CompactionInfo ci) throws MetaException {
-    if (tableCache.isPresent()) {
+  private String getPoolName(CompactionInfo ci, Table t) throws Exception {
+    String poolName = 
t.getParameters().get(Constants.HIVE_COMPACTOR_WORKER_POOL);
+    if (StringUtils.isBlank(poolName)) {
+      poolName = obtainObject(ci.dbname, () -> 
resolveDatabase(ci)).getParameters().get(Constants.HIVE_COMPACTOR_WORKER_POOL);

Review Comment:
   same as above



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