abstractdog commented on code in PR #4920:
URL: https://github.com/apache/hive/pull/4920#discussion_r1433809021


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java:
##########
@@ -716,19 +718,18 @@ private static String getContainerJavaOpts(Configuration 
conf) {
     }
     logLevel = sb.toString();
 
+    String finalOpts = null;
     if (HiveConf.getIntVar(conf, HiveConf.ConfVars.HIVETEZCONTAINERSIZE) > 0) {
-      if (javaOpts != null) {
-        return javaOpts + " " + logLevel;
-      } else  {
-        return logLevel;
-      }
+      finalOpts = javaOpts != null ? javaOpts + " " + logLevel : logLevel;
     } else {
       if (javaOpts != null && !javaOpts.isEmpty()) {
         LOG.warn(HiveConf.ConfVars.HIVETEZJAVAOPTS + " will be ignored because 
"
-                 + HiveConf.ConfVars.HIVETEZCONTAINERSIZE + " is not set!");
+            + HiveConf.ConfVars.HIVETEZCONTAINERSIZE + " is not set!");
       }
-      return logLevel + " " + MRHelpers.getJavaOptsForMRMapper(conf);
+      finalOpts = logLevel + " " + MRHelpers.getJavaOptsForMRMapper(conf);
     }
+    LOG.debug("Tez container log level: '{}', java opts: '{}', final opts: 
{}", logLevel, javaOpts, finalOpts);

Review Comment:
   @deniskuzZ , right, I believe we know hive.tez.container.size from different 
log lines, so finalOpts contains everything we need (as we can figure out 
javaOpts/logLevel from that easily), so I'm fine with making this log message 
simpler, as you and @zabetak suggested



##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezAvailableSlotsCalculator.java:
##########
@@ -39,6 +43,9 @@ public int getAvailableSlots() {
         }
         int totalResource = 
inputInitializerContext.getTotalAvailableResource().getMemory();
         int taskResource = 
inputInitializerContext.getVertexTaskResource().getMemory();
-        return totalResource / taskResource;
+        int availableSlots = totalResource / taskResource;;
+        LOG.debug("totalResource: {} / taskResource: {} =  availableSlots: 
{}", totalResource, taskResource,

Review Comment:
   makes sense! thanks, I'll do



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