You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2015/01/14 03:07:04 UTC
[2/3] ambari git commit: AMBARI-9113. Metric Collector can not to
start on secure cluster.
AMBARI-9113. Metric Collector can not to start on secure cluster.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a4af6ca4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4af6ca4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4af6ca4
Branch: refs/heads/trunk
Commit: a4af6ca4d943ee739b15196a502cd6e3bfdab43f
Parents: e904eb7
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Tue Jan 13 16:22:51 2015 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Tue Jan 13 18:06:58 2015 -0800
----------------------------------------------------------------------
.../AMS/0.1.0/configuration/ams-hbase-env.xml | 9 +++++++++
.../common-services/AMS/0.1.0/package/scripts/ams.py | 12 ++++++++++++
2 files changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a4af6ca4/ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml b/ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml
index bc3f516..f18a0df 100644
--- a/ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml
+++ b/ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml
@@ -131,6 +131,15 @@ export HBASE_OPTS="$HBASE_OPTS -Djava.security.auth.login.config={{client_jaas_c
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Djava.security.auth.login.config={{master_jaas_config_file}}"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Djava.security.auth.login.config={{regionserver_jaas_config_file}}"
{% endif %}
+
+#Specify native libraries of installed Hadoop paltform
+_HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH" which hadoop 2>/dev/null)
+_HADOOP_CLASSPATH="/usr/lib/ams-hbase/lib/*"
+_HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$_HADOOP_CLASSPATH" ${_HADOOP_IN_PATH} org.apache.hadoop.hbase.util.GetJavaProperty java.library.path)
+export HBASE_OPTS="$HBASE_OPTS -Djava.library.path=${_HADOOP_JAVA_LIBRARY_PATH}"
+
+#"Unsetting" HADOOP_HOME to avoid importing HADOOP installed cluster related configs like: /usr/hdp/2.2.0.0-2041/hadoop/conf/
+export HADOOP_HOME=`pwd`
</value>
</property>
http://git-wip-us.apache.org/repos/asf/ambari/blob/a4af6ca4/ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py b/ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py
index 9aa9484..81732b8 100644
--- a/ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py
+++ b/ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py
@@ -87,6 +87,18 @@ def ams(name=None):
recursive=True
)
+ Directory(params.ams_monitor_log_dir,
+ owner=params.ams_user,
+ group=params.user_group,
+ recursive=True
+ )
+
+ Directory(params.ams_monitor_pid_dir,
+ owner=params.ams_user,
+ group=params.user_group,
+ recursive=True
+ )
+
TemplateConfig(
format("{ams_monitor_conf_dir}/metric_monitor.ini"),
owner=params.ams_user,