okumin commented on code in PR #5809:
URL: https://github.com/apache/hive/pull/5809#discussion_r2086770857


##########
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java:
##########
@@ -121,10 +123,9 @@ public int run(String[] args) throws IOException, 
InterruptedException, ClassNot
     if (amMemoryMB != null && !amMemoryMB.isEmpty()) {
       conf.set(AppConfig.HADOOP_MR_AM_MEMORY_MB, amMemoryMB);
     }
-    String amJavaOpts = appConf.controllerAMChildOpts();
-    if (amJavaOpts != null && !amJavaOpts.isEmpty()) {
-      conf.set(AppConfig.HADOOP_MR_AM_JAVA_OPTS, amJavaOpts);
-    }
+    String amJavaOpts = 
StringUtils.defaultString(appConf.controllerAMChildOpts());
+    amJavaOpts = String.join(" ", amJavaOpts, 
JavaVersionUtils.getAddOpensFlagsIfNeeded()).trim();

Review Comment:
   It's my advice. It cleans up the final output when either LHS or RHS is 
empty, and also it's more robust when there is another validation similar to 
[this](https://github.com/apache/hive/blob/03d8f4d4b2791fc1fa49c2b2969996458c194577/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java#L726-L729).



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to