You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2014/03/11 03:08:37 UTC
[06/11] AMBARI-5007. Cleanup stack version info. (Siddharth Wagle via
mahadev)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metrics.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metrics.json
new file mode 100644
index 0000000..ef3cde7
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metrics.json
@@ -0,0 +1,1064 @@
+{
+ "STORM_REST_API": {
+ "Component": [
+ {
+ "type": "jmx",
+ "metrics": {
+ "metrics/api/cluster/summary/tasks.total": {
+ "metric": "tasks.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.total": {
+ "metric": "slots.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.free": {
+ "metric": "slots.free",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/supervisors": {
+ "metric": "supervisors",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/executors.total": {
+ "metric": "executors.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.used": {
+ "metric": "slots.used",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/topologies": {
+ "metric": "topologies",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/nimbus.uptime": {
+ "metric": "nimbus.uptime",
+ "pointInTime": true,
+ "temporal": false
+ }
+ }
+ }
+ ],
+ "HostComponent": [
+ {
+ "type": "jmx",
+ "metrics": {
+ "metrics/api/cluster/summary/tasks.total": {
+ "metric": "tasks.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.total": {
+ "metric": "slots.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.free": {
+ "metric": "slots.free",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/supervisors": {
+ "metric": "supervisors",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/executors.total": {
+ "metric": "executors.total",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/slots.used": {
+ "metric": "slots.used",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/topologies": {
+ "metric": "topologies",
+ "pointInTime": true,
+ "temporal": false
+ },
+ "metrics/api/cluster/summary/nimbus.uptime": {
+ "metric": "nimbus.uptime",
+ "pointInTime": true,
+ "temporal": false
+ }
+ }
+ }
+
+ ]
+ },
+ "NIMBUS": {
+ "Component": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime": {
+ "metric": "boottime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_in": {
+ "metric": "bytes_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_out": {
+ "metric": "bytes_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_aidle": {
+ "metric": "cpu_aidle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_idle": {
+ "metric": "cpu_idle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_nice": {
+ "metric": "cpu_nice",
+ "pointInTime": true,
+ "temporal": true
+ },
+
+ "metrics/cpu/cpu_num": {
+ "metric": "cpu_num",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_speed": {
+ "metric": "cpu_speed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_system": {
+ "metric": "cpu_system",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_user": {
+ "metric": "cpu_user",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_wio": {
+ "metric": "cpu_wio",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_free": {
+ "metric": "disk_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_total": {
+ "metric": "disk_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_fifteen": {
+ "metric": "load_fifteen",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_five": {
+ "metric": "load_five",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_one": {
+ "metric": "load_one",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_buffers": {
+ "metric": "mem_buffers",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_cached": {
+ "metric": "mem_cached",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_free": {
+ "metric": "mem_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_shared": {
+ "metric": "mem_shared",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_total": {
+ "metric": "mem_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/part_max_used": {
+ "metric": "part_max_used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_in": {
+ "metric": "pkts_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_out": {
+ "metric": "pkts_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_run": {
+ "metric": "proc_run",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_total": {
+ "metric": "proc_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_free": {
+ "metric": "swap_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_total": {
+ "metric": "swap_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/committed": {
+ "metric": "Nimbus.JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/init": {
+ "metric": "Nimbus.JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/max": {
+ "metric": "Nimbus.JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/used": {
+ "metric": "Nimbus.JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/committed": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/init": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/max": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/used": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/os/processcputime": {
+ "metric": "Nimbus.JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/threading/daemonthreadcount": {
+ "metric": "Nimbus.JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/threading/threadcount": {
+ "metric": "Nimbus.JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+
+ "metrics/storm/nimbus/freeslots": {
+ "metric": "Free Slots",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/supervisors": {
+ "metric": "Supervisors",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/topologies": {
+ "metric": "Topologies",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/totalexecutors": {
+ "metric": "Total Executors",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/totalslots": {
+ "metric": "Total Slots",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/totaltasks": {
+ "metric": "Total Tasks",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/usedslots": {
+ "metric": "Total Executors",
+ "pointInTime": true,
+ "temporal": true
+ }
+ }
+ }
+ ],
+ "HostComponent": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime": {
+ "metric": "boottime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_in": {
+ "metric": "bytes_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_out": {
+ "metric": "bytes_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_aidle": {
+ "metric": "cpu_aidle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_idle": {
+ "metric": "cpu_idle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_nice": {
+ "metric": "cpu_nice",
+ "pointInTime": true,
+ "temporal": true
+ },
+
+ "metrics/cpu/cpu_num": {
+ "metric": "cpu_num",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_speed": {
+ "metric": "cpu_speed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_system": {
+ "metric": "cpu_system",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_user": {
+ "metric": "cpu_user",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_wio": {
+ "metric": "cpu_wio",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_free": {
+ "metric": "disk_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_total": {
+ "metric": "disk_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_fifteen": {
+ "metric": "load_fifteen",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_five": {
+ "metric": "load_five",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_one": {
+ "metric": "load_one",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_buffers": {
+ "metric": "mem_buffers",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_cached": {
+ "metric": "mem_cached",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_free": {
+ "metric": "mem_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_shared": {
+ "metric": "mem_shared",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_total": {
+ "metric": "mem_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/part_max_used": {
+ "metric": "part_max_used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_in": {
+ "metric": "pkts_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_out": {
+ "metric": "pkts_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_run": {
+ "metric": "proc_run",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_total": {
+ "metric": "proc_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_free": {
+ "metric": "swap_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_total": {
+ "metric": "swap_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/committed": {
+ "metric": "Nimbus.JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/init": {
+ "metric": "Nimbus.JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/max": {
+ "metric": "Nimbus.JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/heap/used": {
+ "metric": "Nimbus.JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/committed": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/init": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/max": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/memory/nonheap/used": {
+ "metric": "Nimbus.JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/os/processcputime": {
+ "metric": "Nimbus.JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/threading/daemonthreadcount": {
+ "metric": "Nimbus.JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/nimbus/jvm/threading/threadcount": {
+ "metric": "Nimbus.JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ }
+
+ }
+ }
+ ]
+ },
+ "SUPERVISOR": {
+ "Component": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime": {
+ "metric": "boottime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_in": {
+ "metric": "bytes_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_out": {
+ "metric": "bytes_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_aidle": {
+ "metric": "cpu_aidle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_idle": {
+ "metric": "cpu_idle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_nice": {
+ "metric": "cpu_nice",
+ "pointInTime": true,
+ "temporal": true
+ },
+
+ "metrics/cpu/cpu_num": {
+ "metric": "cpu_num",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_speed": {
+ "metric": "cpu_speed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_system": {
+ "metric": "cpu_system",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_user": {
+ "metric": "cpu_user",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_wio": {
+ "metric": "cpu_wio",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_free": {
+ "metric": "disk_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_total": {
+ "metric": "disk_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_fifteen": {
+ "metric": "load_fifteen",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_five": {
+ "metric": "load_five",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_one": {
+ "metric": "load_one",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_buffers": {
+ "metric": "mem_buffers",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_cached": {
+ "metric": "mem_cached",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_free": {
+ "metric": "mem_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_shared": {
+ "metric": "mem_shared",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_total": {
+ "metric": "mem_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/part_max_used": {
+ "metric": "part_max_used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_in": {
+ "metric": "pkts_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_out": {
+ "metric": "pkts_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_run": {
+ "metric": "proc_run",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_total": {
+ "metric": "proc_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_free": {
+ "metric": "swap_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_total": {
+ "metric": "swap_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/committed": {
+ "metric": "Supervisor.JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/init": {
+ "metric": "Supervisor.JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/max": {
+ "metric": "Supervisor.JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/used": {
+ "metric": "Supervisor.JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/committed": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/init": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/max": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/used": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/os/processcputime": {
+ "metric": "Supervisor.JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/threading/daemonthreadcount": {
+ "metric": "Supervisor.JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/threading/threadcount": {
+ "metric": "Supervisor.JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/committed": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/init": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/max": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/used": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/committed": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/init": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/max": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/used": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/os/processcputime": {
+ "metric": "Worker.(.+).JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/threading/daemonthreadcount": {
+ "metric": "Worker.(.+).JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/threading/threadcount": {
+ "metric": "Worker.(.+).JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ }
+
+
+ }
+ }
+ ],
+ "HostComponent": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime": {
+ "metric": "boottime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_in": {
+ "metric": "bytes_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/bytes_out": {
+ "metric": "bytes_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_aidle": {
+ "metric": "cpu_aidle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_idle": {
+ "metric": "cpu_idle",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_nice": {
+ "metric": "cpu_nice",
+ "pointInTime": true,
+ "temporal": true
+ },
+
+ "metrics/cpu/cpu_num": {
+ "metric": "cpu_num",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_speed": {
+ "metric": "cpu_speed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_system": {
+ "metric": "cpu_system",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_user": {
+ "metric": "cpu_user",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/cpu/cpu_wio": {
+ "metric": "cpu_wio",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_free": {
+ "metric": "disk_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/disk_total": {
+ "metric": "disk_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_fifteen": {
+ "metric": "load_fifteen",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_five": {
+ "metric": "load_five",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/load_one": {
+ "metric": "load_one",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_buffers": {
+ "metric": "mem_buffers",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_cached": {
+ "metric": "mem_cached",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_free": {
+ "metric": "mem_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_shared": {
+ "metric": "mem_shared",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/mem_total": {
+ "metric": "mem_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/disk/part_max_used": {
+ "metric": "part_max_used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_in": {
+ "metric": "pkts_in",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/network/pkts_out": {
+ "metric": "pkts_out",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_run": {
+ "metric": "proc_run",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/process/proc_total": {
+ "metric": "proc_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_free": {
+ "metric": "swap_free",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/memory/swap_total": {
+ "metric": "swap_total",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/committed": {
+ "metric": "Supervisor.JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/init": {
+ "metric": "Supervisor.JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/max": {
+ "metric": "Supervisor.JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/heap/used": {
+ "metric": "Supervisor.JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/committed": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/init": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/max": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/memory/nonheap/used": {
+ "metric": "Supervisor.JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/os/processcputime": {
+ "metric": "Supervisor.JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/threading/daemonthreadcount": {
+ "metric": "Supervisor.JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/supervisor/jvm/threading/threadcount": {
+ "metric": "Supervisor.JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/committed": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/init": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/max": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/heap/used": {
+ "metric": "Worker.(.+).JVM.Memory.Heap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/committed": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.committed",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/init": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.init",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/max": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.max",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/memory/nonheap/used": {
+ "metric": "Worker.(.+).JVM.Memory.NonHeap.used",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/os/processcputime": {
+ "metric": "Worker.(.+).JVM.OS.ProcessCpuTime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/threading/daemonthreadcount": {
+ "metric": "Worker.(.+).JVM.Threading.DaemonThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/storm/worker/$1/jvm/threading/threadcount": {
+ "metric": "Worker.(.+).JVM.Threading.ThreadCount",
+ "pointInTime": true,
+ "temporal": true
+ }
+ }
+ }
+ ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/files/wordCount.jar
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/files/wordCount.jar b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/files/wordCount.jar
new file mode 100644
index 0000000..aed64be
Binary files /dev/null and b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/files/wordCount.jar differ
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py
new file mode 100644
index 0000000..149b212
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from storm import storm
+from service import service
+from service_check import ServiceCheck
+
+
+class DrpcServer(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("drpc", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("drpc", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.pid_drpc)
+
+if __name__ == "__main__":
+ DrpcServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/logviewer_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/logviewer_server.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/logviewer_server.py
new file mode 100644
index 0000000..9284ce4
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/logviewer_server.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from storm import storm
+from service import service
+from service_check import ServiceCheck
+
+
+class LogviewerServer(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("logviewer", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("logviewer", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.pid_logviewer)
+
+if __name__ == "__main__":
+ LogviewerServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus.py
new file mode 100644
index 0000000..4ddc28f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from storm import storm
+from service import service
+from service_check import ServiceCheck
+
+
+class Nimbus(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("nimbus", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("nimbus", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.pid_nimbus)
+
+if __name__ == "__main__":
+ Nimbus().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
new file mode 100644
index 0000000..138abe0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+import status_params
+
+# server configurations
+config = Script.get_config()
+
+storm_user = config['configurations']['global']['storm_user']
+log_dir = config['configurations']['global']['storm_log_dir']
+pid_dir = status_params.pid_dir
+conf_dir = "/etc/storm/conf"
+local_dir = config['configurations']['storm-site']['storm.local.dir']
+user_group = config['configurations']['global']['user_group']
+java64_home = config['hostLevelParams']['java_home']
+nimbus_host = config['configurations']['storm-site']['nimbus.host']
+nimbus_port = config['configurations']['storm-site']['nimbus.thrift.port']
+nimbus_host = config['configurations']['storm-site']['nimbus.host']
+rest_api_port = "8745"
+rest_api_admin_port = "8746"
+rest_api_conf_file = format("{conf_dir}/config.yaml")
+rest_lib_dir = "/usr/lib/storm/contrib/storm-rest"
+
+if 'ganglia_server_host' in config['clusterHostInfo'] and \
+ len(config['clusterHostInfo']['ganglia_server_host'])>0:
+ ganglia_installed = True
+ ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0]
+ ganglia_report_interval = 60
+else:
+ ganglia_installed = False
+
+_authentication = config['configurations']['core-site']['hadoop.security.authentication']
+security_enabled = ( not is_empty(_authentication) and _authentication == 'kerberos')
+
+if security_enabled:
+ _hostname_lowercase = config['hostname'].lower()
+ _kerberos_domain = config['configurations']['global']['kerberos_domain']
+ _storm_principal_name = config['configurations']['global']['storm_principal_name']
+
+ storm_jaas_principal = format("{_storm_principal_name}/{_hostname_lowercase}@{_kerberos_domain}")
+ storm_keytab_path = config['configurations']['global']['storm_keytab']
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/rest_api.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/rest_api.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/rest_api.py
new file mode 100644
index 0000000..ec7deec
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/rest_api.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from storm import storm
+from service import service
+from service_check import ServiceCheck
+
+
+class StormRestApi(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("rest_api", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("rest_api", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.pid_rest_api)
+
+if __name__ == "__main__":
+ StormRestApi().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py
new file mode 100644
index 0000000..5f9db49
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+
+from resource_management import *
+import time
+
+
+def service(
+ name,
+ action='start'):
+ import params
+ import status_params
+
+ pid_file = status_params.pid_files[name]
+ no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
+
+ if name == 'ui':
+ process_cmd = "^java.+backtype.storm.ui.core$"
+ elif name == "rest_api":
+ process_cmd = format("{java64_home}/bin/java -jar {rest_lib_dir}/`ls {rest_lib_dir} | grep -wE storm-rest-[0-9.-]+\.jar` server")
+ else:
+ process_cmd = format("^java.+backtype.storm.daemon.{name}$")
+
+ crt_pid_cmd = format("pgrep -f \"{process_cmd}\" && pgrep -f \"{process_cmd}\" > {pid_file}")
+
+ if action == "start":
+ if name == "rest_api":
+ cmd = format("{process_cmd} {rest_api_conf_file} > {log_dir}/restapi.log")
+ else:
+ cmd = format("env JAVA_HOME={java64_home} PATH=$PATH:{java64_home}/bin /usr/bin/storm {name}")
+
+ Execute(cmd,
+ not_if=no_op_test,
+ user=params.storm_user,
+ wait_for_finish=False
+ )
+ Execute(crt_pid_cmd,
+ user=params.storm_user,
+ logoutput=True,
+ tries=6,
+ try_sleep=10
+ )
+
+ elif action == "stop":
+ process_dont_exist = format("! ({no_op_test})")
+ pid = format("`cat {pid_file}` >/dev/null 2>&1")
+ Execute(format("kill {pid}"),
+ not_if=process_dont_exist
+ )
+ Execute(format("kill -9 {pid}"),
+ not_if=format("sleep 2; {process_dont_exist} || sleep 20; {process_dont_exist}"),
+ ignore_failures=True
+ )
+ Execute(format("rm -f {pid_file}"))
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py
new file mode 100644
index 0000000..3fc62fb
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+from resource_management.libraries.functions import get_unique_id_and_date
+
+class ServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ unique = get_unique_id_and_date()
+
+ File("/tmp/wordCount.jar",
+ content=StaticFile("wordCount.jar")
+ )
+
+ cmd = format("env JAVA_HOME={java64_home} storm jar /tmp/wordCount.jar storm.starter.WordCountTopology WordCount{unique} -c nimbus.host={nimbus_host}")
+
+ Execute(cmd,
+ logoutput=True
+ )
+
+ Execute(format("env PATH=$PATH:{java64_home}/bin storm kill WordCount{unique}"))
+
+if __name__ == "__main__":
+ ServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/status_params.py
new file mode 100644
index 0000000..66b2a57
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/status_params.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+from resource_management import *
+
+config = Script.get_config()
+
+pid_dir = config['configurations']['global']['storm_pid_dir']
+pid_nimbus = format("{pid_dir}/nimbus.pid")
+pid_supervisor = format("{pid_dir}/supervisor.pid")
+pid_drpc = format("{pid_dir}/drpc.pid")
+pid_ui = format("{pid_dir}/ui.pid")
+pid_logviewer = format("{pid_dir}/logviewer.pid")
+pid_rest_api = format("{pid_dir}/restapi.pid")
+pid_files = {"logviewer":pid_logviewer,
+ "ui": pid_ui,
+ "nimbus": pid_nimbus,
+ "supervisor": pid_supervisor,
+ "drpc": pid_drpc,
+ "rest_api": pid_rest_api}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
new file mode 100644
index 0000000..bce272b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+from yaml_config import yaml_config
+import sys
+
+def storm():
+ import params
+
+ Directory([params.log_dir, params.pid_dir, params.local_dir, params.conf_dir],
+ owner=params.storm_user,
+ group=params.user_group,
+ recursive=True
+ )
+
+ File(format("{conf_dir}/config.yaml"),
+ content=Template("config.yaml.j2"),
+ owner = params.storm_user,
+ group = params.user_group
+ )
+
+ yaml_config( "storm.yaml",
+ conf_dir = params.conf_dir,
+ configurations = params.config['configurations']['storm-site'],
+ owner = params.storm_user,
+ group = params.user_group
+ )
+
+ if params.security_enabled:
+ TemplateConfig( format("{conf_dir}/storm_jaas.conf"),
+ owner = params.storm_user
+ )
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor.py
new file mode 100644
index 0000000..a1f3cca
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from yaml_config import yaml_config
+from storm import storm
+from service import service
+
+
+class Supervisor(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("supervisor", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("supervisor", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+
+ check_process_status(status_params.pid_supervisor)
+
+
+if __name__ == "__main__":
+ Supervisor().execute()
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/ui_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/ui_server.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/ui_server.py
new file mode 100644
index 0000000..6a9d923
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/ui_server.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+import sys
+from resource_management import *
+from storm import storm
+from service import service
+from service_check import ServiceCheck
+
+
+class UiServer(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ storm()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ service("ui", action="start")
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+ service("ui", action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.pid_ui)
+
+if __name__ == "__main__":
+ UiServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/yaml_config.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/yaml_config.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/yaml_config.py
new file mode 100644
index 0000000..c784c40
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/yaml_config.py
@@ -0,0 +1,49 @@
+import re
+from resource_management import *
+
+def escape_yaml_propetry(value):
+ unquouted = False
+ unquouted_values = ["null","Null","NULL","true","True","TRUE","false","False","FALSE","YES","Yes","yes","NO","No","no","ON","On","on","OFF","Off","off"]
+
+ if value in unquouted_values:
+ unquouted = True
+
+ # if is list [a,b,c]
+ if re.match('^\w*\[.+\]\w*$', value):
+ unquouted = True
+
+ try:
+ int(value)
+ unquouted = True
+ except ValueError:
+ pass
+
+ try:
+ float(value)
+ unquouted = True
+ except ValueError:
+ pass
+
+ if not unquouted:
+ value = value.replace("'","''")
+ value = "'"+value+"'"
+
+ return value
+
+def yaml_config(
+ filename,
+ configurations = None,
+ conf_dir = None,
+ mode = None,
+ owner = None,
+ group = None
+):
+ config_content = source.InlineTemplate('''{% for key, value in configurations_dict.items() %}{{ key }}: {{ escape_yaml_propetry(value) }}
+{% endfor %}''', configurations_dict=configurations, extra_imports=[escape_yaml_propetry])
+
+ File (format("{conf_dir}/{filename}"),
+ content = config_content,
+ owner = owner,
+ group = group,
+ mode = mode
+ )
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/config.yaml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/config.yaml.j2 b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/config.yaml.j2
new file mode 100644
index 0000000..89c8e67
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/config.yaml.j2
@@ -0,0 +1,47 @@
+# 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.
+
+nimbusHost: {{nimbus_host}}
+nimbusPort: {{nimbus_port}}
+
+# HTTP-specific options.
+http:
+
+ # The port on which the HTTP server listens for service requests.
+ port: {{rest_api_port}}
+
+ # The port on which the HTTP server listens for administrative requests.
+ adminPort: {{rest_api_admin_port}}
+
+{% if ganglia_installed %}
+enableGanglia: {{ganglia_installed}}
+
+# ganglia configuration (necessary if ganglia reporting is enabled)
+ganglia:
+
+ # how often to report to ganglia metrics (in seconds)
+ reportInterval: {{ganglia_report_interval}}
+
+ # the hostname of the gmond server where storm cluster metrics will be sent
+ host: "{{ganglia_server}}"
+
+ # address mode
+ # default is MULTICAST
+ addressMode: "UNICAST"
+
+ # an <IP>:<HOSTNAME> pair to spoof
+ # this allows us to simulate storm cluster metrics coming from a specific host
+ #spoof: "192.168.1.1:storm"
+{% endif %}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm_jaas.conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm_jaas.conf.j2
new file mode 100644
index 0000000..8f756ed
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm_jaas.conf.j2
@@ -0,0 +1,9 @@
+Client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useKeyTab=true
+ keyTab="{{storm_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="zookeeper"
+ principal="{{storm_jaas_principal}}";
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml
new file mode 100644
index 0000000..5a750bf
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml
@@ -0,0 +1,206 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<configuration>
+
+ <property>
+ <name>tez.lib.uris</name>
+ <value>hdfs:///apps/tez/,hdfs:///apps/tez/lib/</value>
+ <description>The location of the Tez libraries which will be localized for DAGs</description>
+ </property>
+
+ <property>
+ <name>tez.am.log.level</name>
+ <value>INFO</value>
+ <description>Root Logging level passed to the Tez app master</description>
+ </property>
+
+ <property>
+ <name>tez.staging-dir</name>
+ <value>/tmp/${user.name}/staging</value>
+ <description>The staging dir used while submitting DAGs</description>
+ </property>
+
+ <property>
+ <name>tez.am.resource.memory.mb</name>
+ <value>1536</value>
+ <description>The amount of memory to be used by the AppMaster</description>
+ </property>
+
+ <!-- tez picks the java opts from yarn.app.mapreduce.am.command-opts for MR tasks. Likewise for the AM memory MB -->
+ <property>
+ <name>tez.am.java.opts</name>
+ <value>-server -Xmx1024m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -XX:+UseParallelGC</value>
+ <description>Java options for the Tez AppMaster process. The -Xmx parameter value is generally 0.8 times tez.am.resource.memory.mb config.</description>
+ </property>
+
+ <property>
+ <name>tez.am.shuffle-vertex-manager.min-src-fraction</name>
+ <value>0.2</value>
+ <description>In case of a ScatterGather connection, the fraction of source tasks which should
+ complete before tasks for the current vertex are schedule
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.shuffle-vertex-manager.max-src-fraction</name>
+ <value>0.4</value>
+ <description>In case of a ScatterGather connection, once this fraction of source tasks have
+ completed, all tasks on the current vertex can be scheduled. Number of tasks ready for
+ scheduling on the current vertex scales linearly between min-fraction and max-fraction
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.am-rm.heartbeat.interval-ms.max</name>
+ <value>250</value>
+ <description>The maximum heartbeat interval between the AM and RM in milliseconds</description>
+ </property>
+
+ <property>
+ <name>tez.am.grouping.split-waves</name>
+ <value>1.4</value>
+ <description>The multiplier for available queue capacity when determining number of tasks for
+ a Vertex. 1.4 with 100% queue available implies generating a number of tasks roughly equal
+ to 140% of the available containers on the queue
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.grouping.min-size</name>
+ <value>16777216</value>
+ <description>Lower bound on the size (in bytes) of a grouped split, to avoid generating
+ too many splits
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.grouping.max-size</name>
+ <value>1073741824</value>
+ <description>Upper bound on the size (in bytes) of a grouped split, to avoid generating
+ excessively large split
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.container.reuse.enabled</name>
+ <value>true</value>
+ <description>Configuration to specify whether container should be reused</description>
+ </property>
+
+ <property>
+ <name>tez.am.container.reuse.rack-fallback.enabled</name>
+ <value>true</value>
+ <description>Whether to reuse containers for rack local tasks. Active only if reuse is enabled
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.container.reuse.non-local-fallback.enabled</name>
+ <value>true</value>
+ <description>Whether to reuse containers for non-local tasks. Active only if reuse is enabled
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.container.session.delay-allocation-millis</name>
+ <value>10000</value>
+ <!-- TODO This value may change -->
+ <description>The amount of time to hold on to a container if no task can be assigned to
+ it immediately. Only active when reuse is enabled. Set to -1 to never release a container
+ in a session
+ </description>
+ </property>
+
+ <property>
+ <name>tez.am.container.reuse.locality.delay-allocation-millis</name>
+ <value>250</value>
+ <description>The amount of time to wait before assigning a container to the next level of
+ locality. NODE -> RACK -> NON_LOCAL
+ </description>
+ </property>
+
+ <property>
+ <name>tez.task.get-task.sleep.interval-ms.max</name>
+ <value>200</value>
+ <description>The maximum amount of time, in seconds, to wait before a task asks an AM for
+ another task
+ </description>
+ </property>
+
+ <!-- Client Submission timeout value when submitting DAGs to a session -->
+ <property>
+ <name>tez.session.client.timeout.secs</name>
+ <value>60</value>
+ <description>Time (in seconds) to wait for AM to come up when trying to submit a DAG from
+ the client
+ </description>
+ </property>
+
+ <property>
+ <name>tez.session.am.dag.submit.timeout.secs</name>
+ <value>300</value>
+ <description>Time (in seconds) for which the Tez AM should wait for a DAG to be submitted
+ before shutting down
+ </description>
+ </property>
+
+
+ <!-- Configuration for runtime components -->
+
+ <!-- These properties can be set on a per edge basis by configuring the payload for each
+ edge independently. -->
+
+ <property>
+ <name>tez.runtime.intermediate-output.should-compress</name>
+ <value>false</value>
+ <description>Whether intermediate output should be compressed or not</description>
+ </property>
+
+ <property>
+ <name>tez.runtime.intermediate-output.compress.codec</name>
+ <value>org.apache.hadoop.io.compress.SnappyCodec</value>
+ <description>The coded to be used if compressing intermediate output. Only
+ applicable if tez.runtime.intermediate-output.should-compress is enabled.
+ </description>
+ </property>
+
+ <property>
+ <name>tez.runtime.intermediate-input.is-compressed</name>
+ <value>false</value>
+ <description>Whether intermediate input is compressed</description>
+ </property>
+
+ <property>
+ <name>tez.runtime.intermediate-input.compress.codec</name>
+ <value>org.apache.hadoop.io.compress.SnappyCodec</value>
+ <description>The coded to be used when reading intermediate compressed input.
+ Only applicable if tez.runtime.intermediate-input.is-compressed is enabled.</description>
+ </property>
+
+ <!-- Configuration for ATS integration -->
+
+ <property>
+ <name>tez.yarn.ats.enabled</name>
+ <value>true</value>
+ <description>Whether to send history events to YARN Application Timeline Server</description>
+ </property>
+
+</configuration>
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml
new file mode 100644
index 0000000..dd80f87
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>TEZ</name>
+ <comment>Tez is the next generation Hadoop Query Processing framework written on top of YARN.</comment>
+ <version>0.4.0.2.1</version>
+ <components>
+ <component>
+ <name>TEZ_CLIENT</name>
+ <category>CLIENT</category>
+ <commandScript>
+ <script>scripts/tez_client.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+ </components>
+ <osSpecifics>
+ <osSpecific>
+ <osType>any</osType>
+ <packages>
+ <package>
+ <type>rpm</type>
+ <name>tez</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <configuration-dependencies>
+ <config-type>global</config-type>
+ <config-type>tez-site</config-type>
+ </configuration-dependencies>
+
+ </service>
+ </services>
+</metainfo>
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/params.py
new file mode 100644
index 0000000..d02bd50
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/params.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+
+# server configurations
+config = Script.get_config()
+
+config_dir = "/etc/tez/conf"
+
+hadoop_home = '/usr'
+java64_home = config['hostLevelParams']['java_home']
+
+tez_user = 'tez'
+user_group = config['configurations']['global']['user_group']
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
new file mode 100644
index 0000000..399fd78
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python2.6
+"""
+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.
+
+Ambari Agent
+
+"""
+
+from resource_management import *
+
+def tez():
+ import params
+
+ Directory(params.config_dir,
+ owner = params.tez_user,
+ group = params.user_group,
+ recursive = True
+ )
+
+ XmlConfig( "tez-site.xml",
+ conf_dir = params.config_dir,
+ configurations = params.config['configurations']['tez-site'],
+ owner = params.tez_user,
+ group = params.user_group,
+ mode = 0664
+ )
+
+ tez_TemplateConfig( ['tez-env.sh'])
+
+
+def tez_TemplateConfig(name):
+ import params
+
+ if not isinstance(name, list):
+ name = [name]
+
+ for x in name:
+ TemplateConfig(format("{config_dir}/{x}"),
+ owner = params.tez_user
+ )
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
new file mode 100644
index 0000000..95a9b88
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python2.6
+"""
+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.
+
+Ambari Agent
+
+"""
+
+import sys
+from resource_management import *
+from tez import tez
+
+class TezClient(Script):
+ def install(self, env):
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+ tez()
+
+ def status(self, env):
+ raise ClientComponentHasNoStatus()
+
+
+if __name__ == "__main__":
+ TezClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/templates/tez-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/templates/tez-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/templates/tez-env.sh.j2
new file mode 100644
index 0000000..b82329f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/templates/tez-env.sh.j2
@@ -0,0 +1,23 @@
+# 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.
+
+# Tez specific configuration
+export TEZ_CONF_DIR={{config_dir}}
+
+# Set HADOOP_HOME to point to a specific hadoop install directory
+export HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
+
+# The java implementation to use.
+export JAVA_HOME={{java64_home}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a02cf3f1/ambari-server/src/main/resources/stacks/HDP/2.1/services/WEBHCAT/configuration/webhcat-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/WEBHCAT/configuration/webhcat-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/WEBHCAT/configuration/webhcat-site.xml
new file mode 100644
index 0000000..39b901e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/WEBHCAT/configuration/webhcat-site.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<!-- The default settings for Templeton. -->
+<!-- Edit templeton-site.xml to change settings for your local -->
+<!-- install. -->
+
+<configuration>
+
+ <property>
+ <name>templeton.port</name>
+ <value>50111</value>
+ <description>The HTTP port for the main server.</description>
+ </property>
+
+ <property>
+ <name>templeton.hadoop.conf.dir</name>
+ <value>/etc/hadoop/conf</value>
+ <description>The path to the Hadoop configuration.</description>
+ </property>
+
+ <property>
+ <name>templeton.jar</name>
+ <value>/usr/lib/hcatalog/share/webhcat/svr/webhcat.jar</value>
+ <description>The path to the Templeton jar file.</description>
+ </property>
+
+ <property>
+ <name>templeton.libjars</name>
+ <value>/usr/lib/zookeeper/zookeeper.jar</value>
+ <description>Jars to add the the classpath.</description>
+ </property>
+
+
+ <property>
+ <name>templeton.hadoop</name>
+ <value>/usr/bin/hadoop</value>
+ <description>The path to the Hadoop executable.</description>
+ </property>
+
+ <property>
+ <name>templeton.pig.archive</name>
+ <value>hdfs:///apps/webhcat/pig.tar.gz</value>
+ <description>The path to the Pig archive.</description>
+ </property>
+
+ <property>
+ <name>templeton.pig.path</name>
+ <value>pig.tar.gz/pig/bin/pig</value>
+ <description>The path to the Pig executable.</description>
+ </property>
+
+ <property>
+ <name>templeton.hcat</name>
+ <value>/usr/bin/hcat</value>
+ <description>The path to the hcatalog executable.</description>
+ </property>
+
+ <property>
+ <name>templeton.hive.archive</name>
+ <value>hdfs:///apps/webhcat/hive.tar.gz</value>
+ <description>The path to the Hive archive.</description>
+ </property>
+
+ <property>
+ <name>templeton.hive.path</name>
+ <value>hive.tar.gz/hive/bin/hive</value>
+ <description>The path to the Hive executable.</description>
+ </property>
+
+ <property>
+ <name>templeton.hive.properties</name>
+ <value></value>
+ <description>Properties to set when running hive.</description>
+ </property>
+
+
+ <property>
+ <name>templeton.zookeeper.hosts</name>
+ <value>localhost:2181</value>
+ <description>ZooKeeper servers, as comma separated host:port pairs</description>
+ </property>
+
+ <property>
+ <name>templeton.storage.class</name>
+ <value>org.apache.hive.hcatalog.templeton.tool.ZooKeeperStorage</value>
+ <description>The class to use as storage</description>
+ </property>
+
+ <property>
+ <name>templeton.override.enabled</name>
+ <value>false</value>
+ <description>
+ Enable the override path in templeton.override.jars
+ </description>
+ </property>
+
+ <property>
+ <name>templeton.streaming.jar</name>
+ <value>hdfs:///apps/webhcat/hadoop-streaming.jar</value>
+ <description>The hdfs path to the Hadoop streaming jar file.</description>
+ </property>
+
+ <property>
+ <name>templeton.exec.timeout</name>
+ <value>60000</value>
+ <description>Time out for templeton api</description>
+ </property>
+
+</configuration>