You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/08/25 14:09:51 UTC
ambari git commit: AMBARI-10714 - Separate memory configuration for
Hive CLI, HiveServer2, Hive Metastore
Repository: ambari
Updated Branches:
refs/heads/trunk cdb98f73b -> 5b0acfbdc
AMBARI-10714 - Separate memory configuration for Hive CLI, HiveServer2, Hive Metastore
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b0acfbd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b0acfbd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b0acfbd
Branch: refs/heads/trunk
Commit: 5b0acfbdc0fd1da0ee71ca232ff0dd647f435278
Parents: cdb98f7
Author: Artem Baranchuk <ab...@hortonworks.con>
Authored: Fri Aug 21 22:23:16 2015 +0300
Committer: Artem Baranchuk <ab...@hortonworks.con>
Committed: Tue Aug 25 15:06:41 2015 +0300
----------------------------------------------------------------------
.../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 9 ++++++++-
.../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 10 ++++++----
.../2.2/services/HIVE/configuration/hive-env.xml | 16 +++++++++-------
3 files changed, 23 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
index 78b9e8a..4cb2274 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
@@ -196,7 +196,14 @@ export JSVC_HOME={{jsvc_path}}
# The maximum amount of heap to use, in MB. Default is 1000.
-export HADOOP_HEAPSIZE="{{hadoop_heapsize}}"
+if [[ ("$SERVICE" = "hiveserver2") || ("$SERVICE" = "metastore") || ( "$SERVICE" = "cli") ]]; then
+ if [ "$HADOOP_HEAPSIZE" = "" ]; then
+ export HADOOP_HEAPSIZE="{{hadoop_heapsize}}"
+ fi
+else
+ export HADOOP_HEAPSIZE="{{hadoop_heapsize}}"
+fi
+
export HADOOP_NAMENODE_INIT_HEAPSIZE="-Xms{{namenode_heapsize}}"
http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 75371b8..7f622eb 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -290,13 +290,15 @@ start_metastore_path = format("{tmp_dir}/start_metastore_script")
hadoop_heapsize = config['configurations']['hadoop-env']['hadoop_heapsize']
-if Script.is_hdp_stack_less_than("2.2"):
- if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]:
+if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]:
+ if Script.is_hdp_stack_less_than("2.2"):
hive_heapsize = config['configurations']['hive-site']['hive.heapsize']
else:
- hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize']
+ hive_heapsize = config['configurations']['hive-env']['hive.heapsize']
+else:
+ hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize']
- hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize']
+hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize']
java64_home = config['hostLevelParams']['java_home']
http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml
index 3b05dd4..6420333 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml
@@ -22,13 +22,9 @@
<configuration>
<property>
- <name>hive.client.heapsize</name>
- <deleted>true</deleted>
- </property>
-
- <property>
- <name>hive.metastore.heapsize</name>
- <deleted>true</deleted>
+ <name>hive.heapsize</name>
+ <value>1024</value>
+ <description>Hive Java heap size</description>
</property>
<!-- hive-env.sh -->
@@ -45,6 +41,12 @@
fi
# The heap size of the jvm stared by hive shell script can be controlled via:
+export SERVICE=$SERVICE
+if [ "$SERVICE" = "metastore" ]; then
+ export HADOOP_HEAPSIZE="{{hive_metastore_heapsize}}"
+else
+ export HADOOP_HEAPSIZE="{{hive_heapsize}}"
+fi
# Larger heap size may be required when running queries over large number of files or partitions.
# By default hive shell scripts use a heap size of 256 (MB). Larger heap size would also be