deniskuzZ commented on code in PR #5809: URL: https://github.com/apache/hive/pull/5809#discussion_r2087215148
########## 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: [this](https://github.com/apache/hive/blob/03d8f4d4b2791fc1fa49c2b2969996458c194577/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java#L726-L729) didn't handle spaces either. Why not simply use ```` amJavaOpts += JavaVersionUtils.getAddOpensFlagsIfNeeded() ```` add-opens, if required, should start with a space and it already does, so @deagrawa why do you need to add 1 more space -- 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