wuchang created HIVE-16891: ------------------------------ Summary: HIVE_LOCAL_TASK_CHILD_OPTS will repeated twice in child map process jvm parameters Key: HIVE-16891 URL: https://issues.apache.org/jira/browse/HIVE-16891 Project: Hive Issue Type: Improvement Reporter: wuchang
I find that if I set HIVE_LOCAL_TASK_CHILD_OPTS for Hive child process in conf/hive-env.sh, the parameter is always repeated twice in the mapjoin child process. I find the source code here which lead to this unfriendly result: {code:java} if (variables.containsKey(HIVE_LOCAL_TASK_CHILD_OPTS_KEY)) { String childOpts = variables.get(HIVE_LOCAL_TASK_CHILD_OPTS_KEY); if (childOpts == null) { childOpts = ""; } String clientOpts = variables.put(HADOOP_CLIENT_OPTS, childOpts); String tmp = variables.get(HADOOP_OPTS_KEY); if (tmp != null && !StringUtils.isBlank(clientOpts)) { tmp = tmp.replace(clientOpts, childOpts); variables.put(HADOOP_OPTS_KEY, tmp); } } {code} if HIVE_LOCAL_TASK_CHILD_OPTS is set, it will replace the variables with key HADOOP_CLIENT_OPTS, and also , replace part of HADOOP_OPTS_KEY's value. So , both value of key HADOOP_CLIENT_OPTS and value of key HADOOP_OPTS_KEY's will contains the HIVE_LOCAL_TASK_CHILD_OPTS configuration and finally goes to the child process parameter. Although is doesn't affect the rightness of the HiveServer2, but indeed an improvement is necessary. -- This message was sent by Atlassian JIRA (v6.4.14#64029)