Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 71390c8ee -> 4506998ca


AMBARI-16296. Ambari agent changes to push llap metrics to AMS. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4506998c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4506998c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4506998c

Branch: refs/heads/branch-2.4
Commit: 4506998ca29124c6f23ae45276c7aa8109a0f486
Parents: 71390c8
Author: Jaimin Jetly <jai...@hortonworks.com>
Authored: Wed May 11 16:16:49 2016 -0700
Committer: Jaimin Jetly <jai...@hortonworks.com>
Committed: Thu May 12 11:04:21 2016 -0700

----------------------------------------------------------------------
 .../package/scripts/hive_interactive.py         | 11 +++++
 .../templates/hadoop-metrics2-llapdaemon.j2     | 52 ++++++++++++++++++++
 .../hadoop-metrics2-llaptaskscheduler.j2        | 52 ++++++++++++++++++++
 .../stacks/2.5/HIVE/test_hive_server_int.py     | 11 +++++
 4 files changed, 126 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4506998c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 901b276..ce949df 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -167,6 +167,17 @@ def hive_interactive(name=None):
          owner=params.hive_user,
          content=params.beeline_log4j2)
 
+      
File(format("{hive_server_interactive_conf_dir}/hadoop-metrics2-llapdaemon.properties"),
+           owner=params.hive_user,
+           group=params.user_group,
+           content=Template("hadoop-metrics2-llapdaemon.j2"))
+
+      
File(format("{hive_server_interactive_conf_dir}/hadoop-metrics2-llaptaskscheduler.properties"),
+           owner=params.hive_user,
+           group=params.user_group,
+           content=Template("hadoop-metrics2-llaptaskscheduler.j2"))
+
+
   # On some OS this folder could be not exists, so we will create it before 
pushing there files
   Directory(params.limits_conf_dir,
             create_parents = True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/4506998c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
new file mode 100644
index 0000000..1d75ccf
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
@@ -0,0 +1,52 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# syntax: [prefix].[source|sink|jmx].[instance].[options]
+# See package.html for org.apache.hadoop.metrics2 for details
+
+{% if has_metric_collector %}
+
+  *.period={{metrics_collection_period}}
+  
*.sink.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
+  
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
+  *.sink.timeline.period={{metrics_collection_period}}
+  *.sink.timeline.sendInterval={{metrics_report_interval}}000
+
+  # HTTPS properties
+  *.sink.timeline.truststore.path = {{metric_truststore_path}}
+  *.sink.timeline.truststore.type = {{metric_truststore_type}}
+  *.sink.timeline.truststore.password = {{metric_truststore_password}}
+
+  
llapdaemon.sink.timeline.collector={{metric_collector_protocol}}://{{metric_collector_host}}:{{metric_collector_port}}
+
+{% endif %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4506998c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
new file mode 100644
index 0000000..5ab787c
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
@@ -0,0 +1,52 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# syntax: [prefix].[source|sink|jmx].[instance].[options]
+# See package.html for org.apache.hadoop.metrics2 for details
+
+{% if has_metric_collector %}
+
+  *.period={{metrics_collection_period}}
+  
*.sink.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
+  
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
+  *.sink.timeline.period={{metrics_collection_period}}
+  *.sink.timeline.sendInterval={{metrics_report_interval}}000
+
+  # HTTPS properties
+  *.sink.timeline.truststore.path = {{metric_truststore_path}}
+  *.sink.timeline.truststore.type = {{metric_truststore_type}}
+  *.sink.timeline.truststore.password = {{metric_truststore_password}}
+
+  
llaptaskscheduler.sink.timeline.collector={{metric_collector_protocol}}://{{metric_collector_host}}:{{metric_collector_port}}
+
+{% endif %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4506998c/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 4cc9c1f..dc02f9f 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -260,6 +260,17 @@ class TestHiveServerInteractive(RMFTestCase):
                                   group='hadoop',
                                   mode=0644,
         )
+        self.assertResourceCalled('File', os.path.join(conf_dir, 
'hadoop-metrics2-llapdaemon.properties'),
+                                  
content=Template("hadoop-metrics2-llapdaemon.j2"),
+                                  owner='hive',
+                                  group='hadoop'
+        )
+
+        self.assertResourceCalled('File', os.path.join(conf_dir, 
'hadoop-metrics2-llaptaskscheduler.properties'),
+                                  
content=Template("hadoop-metrics2-llaptaskscheduler.j2"),
+                                  owner='hive',
+                                  group='hadoop'
+        )
         pass
 
     self.assertResourceCalled('Directory', '/etc/security/limits.d',

Reply via email to