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/01/17 20:49:24 UTC
[09/12] AMBARI-4336. Move 1.3.4 stack to 1.3.3 using the python
libraries. (mahadev)
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopGmond.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopGmond.sh b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopGmond.sh
deleted file mode 100644
index 1af3eb9..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopGmond.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-#/*
-# * 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.
-# */
-
-cd `dirname ${0}`;
-
-# Get all our common constants etc. set up.
-# Pulls in gangliaLib.sh as well, so we can skip pulling it in again.
-source ./gmondLib.sh;
-
-function stopGmondForCluster()
-{
- gmondClusterName=${1};
-
- gmondRunningPid=`getGmondRunningPid ${gmondClusterName}`;
-
- # Only go ahead with the termination if we could find a running PID.
- if [ -n "${gmondRunningPid}" ]
- then
- kill -KILL ${gmondRunningPid};
- echo "Stopped ${GMOND_BIN} for cluster ${gmondClusterName} (with PID ${gmondRunningPid})";
- fi
-}
-
-# main()
-gmondClusterName=${1};
-
-if [ "x" == "x${gmondClusterName}" ]
-then
- # No ${gmondClusterName} passed in as command-line arg, so stop
- # all the gmonds we know about.
- for gmondClusterName in `getConfiguredGangliaClusterNames`
- do
- stopGmondForCluster ${gmondClusterName};
- done
-else
- stopGmondForCluster ${gmondClusterName};
-fi
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopRrdcached.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopRrdcached.sh b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopRrdcached.sh
deleted file mode 100644
index 0a0d8d8..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/stopRrdcached.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-#/*
-# * 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.
-# */
-
-cd `dirname ${0}`;
-
-# Get all our common constants etc. set up.
-source ./rrdcachedLib.sh;
-
-rrdcachedRunningPid=`getRrdcachedRunningPid`;
-
-# Only go ahead with the termination if we could find a running PID.
-if [ -n "${rrdcachedRunningPid}" ]
-then
- kill -TERM ${rrdcachedRunningPid};
- # ${RRDCACHED_BIN} takes a few seconds to drain its buffers, so wait
- # until we're sure it's well and truly dead.
- #
- # Without this, an immediately following startRrdcached.sh won't do
- # anything, because it still sees this soon-to-die instance alive,
- # and the net result is that after a few seconds, there's no
- # ${RRDCACHED_BIN} running on the box anymore.
- sleep 5;
- echo "Stopped ${RRDCACHED_BIN} (with PID ${rrdcachedRunningPid})";
-fi
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/teardownGanglia.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/teardownGanglia.sh b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/teardownGanglia.sh
deleted file mode 100644
index b27f7a2..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/files/teardownGanglia.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-#/*
-# * 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.
-# */
-
-cd `dirname ${0}`;
-
-# Get access to Ganglia-wide constants, utilities etc.
-source ./gangliaLib.sh;
-
-# Undo what we did while setting up Ganglia on this box.
-rm -rf ${GANGLIA_CONF_DIR};
-rm -rf ${GANGLIA_RUNTIME_DIR};
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia.py
deleted file mode 100644
index 1eae6d0..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia.py
+++ /dev/null
@@ -1,106 +0,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.
-"""
-
-from resource_management import *
-import os
-
-
-def groups_and_users():
- import params
-
- Group(params.user_group)
- Group(params.gmetad_user)
- Group(params.gmond_user)
- User(params.gmond_user,
- groups=[params.gmond_user])
- User(params.gmetad_user,
- groups=[params.gmetad_user])
-
-
-def config():
- import params
-
- shell_cmds_dir = params.ganglia_shell_cmds_dir
- shell_files = ['checkGmond.sh', 'checkRrdcached.sh', 'gmetadLib.sh',
- 'gmondLib.sh', 'rrdcachedLib.sh',
- 'setupGanglia.sh', 'startGmetad.sh', 'startGmond.sh',
- 'startRrdcached.sh', 'stopGmetad.sh',
- 'stopGmond.sh', 'stopRrdcached.sh', 'teardownGanglia.sh']
- Directory(shell_cmds_dir,
- owner="root",
- group="root",
- recursive=True
- )
- init_file("gmetad")
- init_file("gmond")
- for sh_file in shell_files:
- shell_file(sh_file)
- for conf_file in ['gangliaClusters.conf', 'gangliaEnv.sh', 'gangliaLib.sh']:
- ganglia_TemplateConfig(conf_file)
-
-
-def init_file(name):
- import params
-
- File("/etc/init.d/hdp-" + name,
- content=StaticFile(name + ".init"),
- mode=0755
- )
-
-
-def shell_file(name):
- import params
-
- File(params.ganglia_shell_cmds_dir + os.sep + name,
- content=StaticFile(name),
- mode=0755
- )
-
-
-def ganglia_TemplateConfig(name, mode=755, tag=None):
- import params
-
- TemplateConfig(format("{params.ganglia_shell_cmds_dir}/{name}"),
- owner="root",
- group="root",
- template_tag=tag,
- mode=mode
- )
-
-
-def generate_daemon(ganglia_service,
- name=None,
- role=None,
- owner=None,
- group=None):
- import params
-
- cmd = ""
- if ganglia_service == "gmond":
- if role == "server":
- cmd = "{params.ganglia_shell_cmds_dir}/setupGanglia.sh -c {name} -m -o {owner} -g {group}"
- else:
- cmd = "{params.ganglia_shell_cmds_dir}/setupGanglia.sh -c {name} -o {owner} -g {group}"
- elif ganglia_service == "gmetad":
- cmd = "{params.ganglia_shell_cmds_dir}/setupGanglia.sh -t -o {owner} -g {group}"
- else:
- raise Fail("Unexpected ganglia service")
- Execute(format(cmd),
- path=[params.ganglia_shell_cmds_dir, "/usr/sbin",
- "/sbin:/usr/local/bin", "/bin", "/usr/bin"]
- )
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor.py
deleted file mode 100644
index bddecf6..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor.py
+++ /dev/null
@@ -1,163 +0,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.
-"""
-
-import sys
-import os
-from os import path
-from resource_management import *
-from ganglia import generate_daemon
-import ganglia
-import ganglia_monitor_service
-
-
-class GangliaMonitor(Script):
- def install(self, env):
- import params
-
- self.install_packages(env)
- env.set_params(params)
- self.config(env)
-
- def start(self, env):
- ganglia_monitor_service.monitor("start")
-
- def stop(self, env):
- ganglia_monitor_service.monitor("stop")
-
-
- def status(self, env):
- import status_params
- pid_file_name = 'gmond.pid'
- pid_file_count = 0
- pid_dir = status_params.pid_dir
- # Recursively check all existing gmond pid files
- for cur_dir, subdirs, files in os.walk(pid_dir):
- for file_name in files:
- if file_name == pid_file_name:
- pid_file = os.path.join(cur_dir, file_name)
- check_process_status(pid_file)
- pid_file_count += 1
- if pid_file_count == 0: # If no any pid file is present
- raise ComponentIsNotRunning()
-
-
- def config(self, env):
- import params
-
- ganglia.groups_and_users()
-
- Directory(params.ganglia_conf_dir,
- owner="root",
- group=params.user_group,
- recursive=True
- )
-
- ganglia.config()
-
- if params.is_namenode_master:
- generate_daemon("gmond",
- name = "HDPNameNode",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_jtnode_master:
- generate_daemon("gmond",
- name = "HDPJobTracker",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_rmnode_master:
- generate_daemon("gmond",
- name = "HDPResourceManager",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_hsnode_master:
- generate_daemon("gmond",
- name = "HDPHistoryServer",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_hbase_master:
- generate_daemon("gmond",
- name = "HDPHBaseMaster",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_hsnode_master:
- generate_daemon("gmond",
- name = "HDPHistoryServer",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_slave:
- generate_daemon("gmond",
- name = "HDPDataNode",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_tasktracker:
- generate_daemon("gmond",
- name = "HDPTaskTracker",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_hbase_rs:
- generate_daemon("gmond",
- name = "HDPHBaseRegionServer",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
- if params.is_flume:
- generate_daemon("gmond",
- name = "HDPFlumeServer",
- role = "monitor",
- owner = "root",
- group = params.user_group)
-
-
- Directory(path.join(params.ganglia_dir, "conf.d"),
- owner="root",
- group=params.user_group
- )
-
- File(path.join(params.ganglia_dir, "conf.d/modgstatus.conf"),
- owner="root",
- group=params.user_group
- )
- File(path.join(params.ganglia_dir, "conf.d/multicpu.conf"),
- owner="root",
- group=params.user_group
- )
- File(path.join(params.ganglia_dir, "gmond.conf"),
- owner="root",
- group=params.user_group
- )
-
-
-if __name__ == "__main__":
- GangliaMonitor().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor_service.py
deleted file mode 100644
index d86d894..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_monitor_service.py
+++ /dev/null
@@ -1,31 +0,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.
-"""
-
-from resource_management import *
-
-
-def monitor(action=None):# 'start' or 'stop'
- if action == "start":
- Execute("chkconfig gmond off",
- path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
- )
- Execute(
- format(
- "service hdp-gmond {action} >> /tmp/gmond.log 2>&1 ; /bin/ps auwx | /bin/grep [g]mond >> /tmp/gmond.log 2>&1"),
- path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
- )
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server.py
deleted file mode 100644
index e391562..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server.py
+++ /dev/null
@@ -1,181 +0,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.
-"""
-
-import sys
-import os
-from os import path
-from resource_management import *
-from ganglia import generate_daemon
-import ganglia
-import ganglia_server_service
-
-
-class GangliaServer(Script):
- def install(self, env):
- import params
-
- self.install_packages(env)
- env.set_params(params)
- self.config(env)
-
- def start(self, env):
- import params
-
- env.set_params(params)
- ganglia_server_service.server("start")
-
- def stop(self, env):
- import params
-
- env.set_params(params)
- ganglia_server_service.server("stop")
-
- def status(self, env):
- import status_params
- env.set_params(status_params)
- pid_file = format("{pid_dir}/gmetad.pid")
- # Recursively check all existing gmetad pid files
- check_process_status(pid_file)
-
- def config(self, env):
- import params
-
- ganglia.groups_and_users()
- ganglia.config()
-
- if params.has_namenodes:
- generate_daemon("gmond",
- name = "HDPNameNode",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_jobtracker:
- generate_daemon("gmond",
- name = "HDPJobTracker",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_hbase_masters:
- generate_daemon("gmond",
- name = "HDPHBaseMaster",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_resourcemanager:
- generate_daemon("gmond",
- name = "HDPResourceManager",
- role = "server",
- owner = "root",
- group = params.user_group)
- if params.has_historyserver:
- generate_daemon("gmond",
- name = "HDPHistoryServer",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_slaves:
- generate_daemon("gmond",
- name = "HDPDataNode",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_tasktracker:
- generate_daemon("gmond",
- name = "HDPTaskTracker",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_hbase_rs:
- generate_daemon("gmond",
- name = "HDPHBaseRegionServer",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- if params.has_flume:
- generate_daemon("gmond",
- name = "HDPFlumeServer",
- role = "server",
- owner = "root",
- group = params.user_group)
- generate_daemon("gmetad",
- name = "gmetad",
- role = "server",
- owner = "root",
- group = params.user_group)
-
- change_permission()
- server_files()
- File(path.join(params.ganglia_dir, "gmetad.conf"),
- owner="root",
- group=params.user_group
- )
-
-
-def change_permission():
- import params
-
- Directory('/var/lib/ganglia/dwoo',
- mode=0777,
- owner=params.gmetad_user,
- recursive=True
- )
-
-
-def server_files():
- import params
-
- rrd_py_path = params.rrd_py_path
- Directory(rrd_py_path,
- recursive=True
- )
- rrd_py_file_path = path.join(rrd_py_path, "rrd.py")
- File(rrd_py_file_path,
- content=StaticFile("rrd.py"),
- mode=0755
- )
- rrd_file_owner = params.gmetad_user
- if params.rrdcached_default_base_dir != params.rrdcached_base_dir:
- Directory(params.rrdcached_base_dir,
- owner=rrd_file_owner,
- group=rrd_file_owner,
- mode=0755,
- recursive=True
- )
- Directory(params.rrdcached_default_base_dir,
- action = "delete"
- )
- Link(params.rrdcached_default_base_dir,
- to=params.rrdcached_base_dir
- )
- elif rrd_file_owner != 'nobody':
- Directory(params.rrdcached_default_base_dir,
- owner=rrd_file_owner,
- group=rrd_file_owner,
- recursive=True
- )
-
-
-if __name__ == "__main__":
- GangliaServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server_service.py
deleted file mode 100644
index b93e3f8..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/ganglia_server_service.py
+++ /dev/null
@@ -1,27 +0,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.
-"""
-
-from resource_management import *
-
-
-def server(action=None):# 'start' or 'stop'
- command = "service hdp-gmetad {action} >> /tmp/gmetad.log 2>&1 ; /bin/ps auwx | /bin/grep [g]metad >> /tmp/gmetad.log 2>&1"
- Execute(format(command),
- path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
- )
- MonitorWebserver("restart")
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/params.py
deleted file mode 100644
index 3700d0a..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/params.py
+++ /dev/null
@@ -1,74 +0,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.
-"""
-
-from resource_management import *
-from resource_management.core.system import System
-
-config = Script.get_config()
-
-user_group = config['configurations']['global']["user_group"]
-ganglia_conf_dir = config['configurations']['global']["ganglia_conf_dir"]
-ganglia_dir = "/etc/ganglia"
-ganglia_runtime_dir = config['configurations']['global']["ganglia_runtime_dir"]
-ganglia_shell_cmds_dir = "/usr/libexec/hdp/ganglia"
-
-gmetad_user = config['configurations']['global']["gmetad_user"]
-gmond_user = config['configurations']['global']["gmond_user"]
-
-webserver_group = "apache"
-rrdcached_default_base_dir = "/var/lib/ganglia/rrds"
-rrdcached_base_dir = config['configurations']['global']["rrdcached_base_dir"]
-
-ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0]
-
-hostname = config["hostname"]
-namenode_host = default("/clusterHostInfo/namenode_host", [])
-jtnode_host = default("/clusterHostInfo/jtnode_host", [])
-rm_host = default("/clusterHostInfo/rm_host", [])
-hs_host = default("/clusterHostInfo/hs_host", [])
-hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
-# datanodes are marked as slave_hosts
-slave_hosts = default("/clusterHostInfo/slave_hosts", [])
-tt_hosts = default("/clusterHostInfo/mapred_tt_hosts", [])
-hbase_rs_hosts = default("/clusterHostInfo/hbase_rs_hosts", [])
-flume_hosts = default("/clusterHostInfo/flume_hosts", [])
-
-is_namenode_master = hostname in namenode_host
-is_jtnode_master = hostname in jtnode_host
-is_rmnode_master = hostname in rm_host
-is_hsnode_master = hostname in hs_host
-is_hbase_master = hostname in hbase_master_hosts
-is_slave = hostname in slave_hosts
-is_tasktracker = hostname in tt_hosts
-is_hbase_rs = hostname in hbase_rs_hosts
-is_flume = hostname in flume_hosts
-
-has_namenodes = not len(namenode_host) == 0
-has_jobtracker = not len(jtnode_host) == 0
-has_resourcemanager = not len(rm_host) == 0
-has_historyserver = not len(hs_host) == 0
-has_hbase_masters = not len(hbase_master_hosts) == 0
-has_slaves = not len(slave_hosts) == 0
-has_tasktracker = not len(tt_hosts) == 0
-has_hbase_rs = not len(hbase_rs_hosts) == 0
-has_flume = not len(flume_hosts) == 0
-
-if System.get_instance().platform == "suse":
- rrd_py_path = '/srv/www/cgi-bin'
-else:
- rrd_py_path = '/var/www/cgi-bin'
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/status_params.py
deleted file mode 100644
index 3ccad2f..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/scripts/status_params.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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']['ganglia_runtime_dir']
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaClusters.conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaClusters.conf.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaClusters.conf.j2
deleted file mode 100644
index 23588a5..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaClusters.conf.j2
+++ /dev/null
@@ -1,34 +0,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.
-# */
-
-#########################################################
-### ClusterName GmondMasterHost GmondPort ###
-#########################################################
-
- HDPJournalNode {{ganglia_server_host}} 8654
- HDPFlumeServer {{ganglia_server_host}} 8655
- HDPHBaseRegionServer {{ganglia_server_host}} 8656
- HDPNodeManager {{ganglia_server_host}} 8657
- HDPTaskTracker {{ganglia_server_host}} 8658
- HDPDataNode {{ganglia_server_host}} 8659
- HDPSlaves {{ganglia_server_host}} 8660
- HDPNameNode {{ganglia_server_host}} 8661
- HDPJobTracker {{ganglia_server_host}} 8662
- HDPHBaseMaster {{ganglia_server_host}} 8663
- HDPResourceManager {{ganglia_server_host}} 8664
- HDPHistoryServer {{ganglia_server_host}} 8666
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaEnv.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaEnv.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaEnv.sh.j2
deleted file mode 100644
index 1ead550..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaEnv.sh.j2
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-#/*
-# * 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.
-# */
-
-# Unix users and groups for the binaries we start up.
-GMETAD_USER={{gmetad_user}};
-GMOND_USER={{gmond_user}};
-WEBSERVER_GROUP={{webserver_group}};
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaLib.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaLib.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaLib.sh.j2
deleted file mode 100644
index 4b5bdd1..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/GANGLIA/package/templates/gangliaLib.sh.j2
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-#/*
-# * 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.
-# */
-
-cd `dirname ${0}`;
-
-GANGLIA_CONF_DIR={{ganglia_conf_dir}};
-GANGLIA_RUNTIME_DIR={{ganglia_runtime_dir}};
-RRDCACHED_BASE_DIR={{rrdcached_base_dir}};
-
-# This file contains all the info about each Ganglia Cluster in our Grid.
-GANGLIA_CLUSTERS_CONF_FILE=./gangliaClusters.conf;
-
-function createDirectory()
-{
- directoryPath=${1};
-
- if [ "x" != "x${directoryPath}" ]
- then
- mkdir -p ${directoryPath};
- fi
-}
-
-function getGangliaClusterInfo()
-{
- clusterName=${1};
-
- if [ "x" != "x${clusterName}" ]
- then
- # Fetch the particular entry for ${clusterName} from ${GANGLIA_CLUSTERS_CONF_FILE}.
- awk -v clusterName=${clusterName} '($1 !~ /^#/) && ($1 == clusterName)' ${GANGLIA_CLUSTERS_CONF_FILE};
- else
- # Spit out all the non-comment, non-empty lines from ${GANGLIA_CLUSTERS_CONF_FILE}.
- awk '($1 !~ /^#/) && (NF)' ${GANGLIA_CLUSTERS_CONF_FILE};
- fi
-}
-
-function getConfiguredGangliaClusterNames()
-{
- # Find all the subdirectories in ${GANGLIA_CONF_DIR} and extract only
- # the subdirectory name from each.
- if [ -e ${GANGLIA_CONF_DIR} ]
- then
- find ${GANGLIA_CONF_DIR} -maxdepth 1 -mindepth 1 -type d | xargs -n1 basename;
- fi
-}
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/global.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/global.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/global.xml
deleted file mode 100644
index 453184b..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/global.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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>hbasemaster_host</name>
- <value></value>
- <description>HBase Master Host.</description>
- </property>
- <property>
- <name>regionserver_hosts</name>
- <value></value>
- <description>Region Server Hosts</description>
- </property>
- <property>
- <name>hbase_log_dir</name>
- <value>/var/log/hbase</value>
- <description>Log Directories for HBase.</description>
- </property>
- <property>
- <name>hbase_pid_dir</name>
- <value>/var/run/hbase</value>
- <description>Log Directories for HBase.</description>
- </property>
- <property>
- <name>hbase_log_dir</name>
- <value>/var/log/hbase</value>
- <description>Log Directories for HBase.</description>
- </property>
- <property>
- <name>hbase_regionserver_heapsize</name>
- <value>1024</value>
- <description>Log Directories for HBase.</description>
- </property>
- <property>
- <name>hbase_master_heapsize</name>
- <value>1024</value>
- <description>HBase Master Heap Size</description>
- </property>
- <property>
- <name>hstore_compactionthreshold</name>
- <value>3</value>
- <description>HBase HStore compaction threshold.</description>
- </property>
- <property>
- <name>hfile_blockcache_size</name>
- <value>0.25</value>
- <description>HFile block cache size.</description>
- </property>
- <property>
- <name>hstorefile_maxsize</name>
- <value>10737418240</value>
- <description>Maximum HStoreFile Size</description>
- </property>
- <property>
- <name>regionserver_handlers</name>
- <value>30</value>
- <description>HBase RegionServer Handler</description>
- </property>
- <property>
- <name>hregion_majorcompaction</name>
- <value>86400000</value>
- <description>HBase Major Compaction.</description>
- </property>
- <property>
- <name>hregion_blockmultiplier</name>
- <value>2</value>
- <description>HBase Region Block Multiplier</description>
- </property>
- <property>
- <name>hregion_memstoreflushsize</name>
- <value></value>
- <description>HBase Region MemStore Flush Size.</description>
- </property>
- <property>
- <name>client_scannercaching</name>
- <value>100</value>
- <description>Base Client Scanner Caching</description>
- </property>
- <property>
- <name>zookeeper_sessiontimeout</name>
- <value>60000</value>
- <description>ZooKeeper Session Timeout</description>
- </property>
- <property>
- <name>hfile_max_keyvalue_size</name>
- <value>10485760</value>
- <description>HBase Client Maximum key-value Size</description>
- </property>
- <property>
- <name>hbase_hdfs_root_dir</name>
- <value>/apps/hbase/data</value>
- <description>HBase Relative Path to HDFS.</description>
- </property>
- <property>
- <name>hbase_conf_dir</name>
- <value>/etc/hbase</value>
- <description>Config Directory for HBase.</description>
- </property>
- <property>
- <name>hdfs_enable_shortcircuit_read</name>
- <value>true</value>
- <description>HDFS Short Circuit Read</description>
- </property>
- <property>
- <name>hdfs_support_append</name>
- <value>true</value>
- <description>HDFS append support</description>
- </property>
- <property>
- <name>hstore_blockingstorefiles</name>
- <value>7</value>
- <description>HStore blocking storefiles.</description>
- </property>
- <property>
- <name>regionserver_memstore_lab</name>
- <value>true</value>
- <description>Region Server memstore.</description>
- </property>
- <property>
- <name>regionserver_memstore_lowerlimit</name>
- <value>0.35</value>
- <description>Region Server memstore lower limit.</description>
- </property>
- <property>
- <name>regionserver_memstore_upperlimit</name>
- <value>0.4</value>
- <description>Region Server memstore upper limit.</description>
- </property>
- <property>
- <name>hbase_conf_dir</name>
- <value>/etc/hbase</value>
- <description>HBase conf dir.</description>
- </property>
- <property>
- <name>hbase_user</name>
- <value>hbase</value>
- <description>HBase User Name.</description>
- </property>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-policy.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-policy.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-policy.xml
deleted file mode 100644
index e45f23c..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-policy.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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>security.client.protocol.acl</name>
- <value>*</value>
- <description>ACL for HRegionInterface protocol implementations (ie.
- clients talking to HRegionServers)
- The ACL is a comma-separated list of user and group names. The user and
- group list is separated by a blank. For e.g. "alice,bob users,wheel".
- A special value of "*" means all users are allowed.</description>
- </property>
-
- <property>
- <name>security.admin.protocol.acl</name>
- <value>*</value>
- <description>ACL for HMasterInterface protocol implementation (ie.
- clients talking to HMaster for admin operations).
- The ACL is a comma-separated list of user and group names. The user and
- group list is separated by a blank. For e.g. "alice,bob users,wheel".
- A special value of "*" means all users are allowed.</description>
- </property>
-
- <property>
- <name>security.masterregion.protocol.acl</name>
- <value>*</value>
- <description>ACL for HMasterRegionInterface protocol implementations
- (for HRegionServers communicating with HMaster)
- The ACL is a comma-separated list of user and group names. The user and
- group list is separated by a blank. For e.g. "alice,bob users,wheel".
- A special value of "*" means all users are allowed.</description>
- </property>
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-site.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-site.xml
deleted file mode 100644
index 68904a1..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/configuration/hbase-site.xml
+++ /dev/null
@@ -1,367 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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>hbase.rootdir</name>
- <value>hdfs://localhost:8020/apps/hbase/data</value>
- <description>The directory shared by region servers and into
- which HBase persists. The URL should be 'fully-qualified'
- to include the filesystem scheme. For example, to specify the
- HDFS directory '/hbase' where the HDFS instance's namenode is
- running at namenode.example.org on port 9000, set this value to:
- hdfs://namenode.example.org:9000/hbase. By default HBase writes
- into /tmp. Change this configuration else all data will be lost
- on machine restart.
- </description>
- </property>
- <property>
- <name>hbase.cluster.distributed</name>
- <value>true</value>
- <description>The mode the cluster will be in. Possible values are
- false for standalone mode and true for distributed mode. If
- false, startup will run all HBase and ZooKeeper daemons together
- in the one JVM.
- </description>
- </property>
- <property>
- <name>hbase.tmp.dir</name>
- <value>/hadoop/hbase</value>
- <description>Temporary directory on the local filesystem.
- Change this setting to point to a location more permanent
- than '/tmp' (The '/tmp' directory is often cleared on
- machine restart).
- </description>
- </property>
- <property>
- <name>hbase.master.info.bindAddress</name>
- <value></value>
- <description>The bind address for the HBase Master web UI
- </description>
- </property>
- <property>
- <name>hbase.master.info.port</name>
- <value></value>
- <description>The port for the HBase Master web UI.</description>
- </property>
- <property>
- <name>hbase.regionserver.info.port</name>
- <value></value>
- <description>The port for the HBase RegionServer web UI.</description>
- </property>
- <property>
- <name>hbase.regionserver.global.memstore.upperLimit</name>
- <value>0.4</value>
- <description>Maximum size of all memstores in a region server before new
- updates are blocked and flushes are forced. Defaults to 40% of heap
- </description>
- </property>
- <property>
- <name>hbase.regionserver.handler.count</name>
- <value>60</value>
- <description>Count of RPC Listener instances spun up on RegionServers.
- Same property is used by the Master for count of master handlers.
- Default is 10.
- </description>
- </property>
- <property>
- <name>hbase.hregion.majorcompaction</name>
- <value>86400000</value>
- <description>The time (in milliseconds) between 'major' compactions of all
- HStoreFiles in a region. Default: 1 day.
- Set to 0 to disable automated major compactions.
- </description>
- </property>
-
- <property>
- <name>hbase.regionserver.global.memstore.lowerLimit</name>
- <value>0.38</value>
- <description>When memstores are being forced to flush to make room in
- memory, keep flushing until we hit this mark. Defaults to 35% of heap.
- This value equal to hbase.regionserver.global.memstore.upperLimit causes
- the minimum possible flushing to occur when updates are blocked due to
- memstore limiting.
- </description>
- </property>
- <property>
- <name>hbase.hregion.memstore.block.multiplier</name>
- <value>2</value>
- <description>Block updates if memstore has hbase.hregion.memstore.block.multiplier
- time hbase.hregion.flush.size bytes. Useful preventing
- runaway memstore during spikes in update traffic. Without an
- upper-bound, memstore fills such that when it flushes the
- resultant flush files take a long time to compact or split, or
- worse, we OOME
- </description>
- </property>
- <property>
- <name>hbase.hregion.memstore.flush.size</name>
- <value>134217728</value>
- <description>
- Memstore will be flushed to disk if size of the memstore
- exceeds this number of bytes. Value is checked by a thread that runs
- every hbase.server.thread.wakefrequency.
- </description>
- </property>
- <property>
- <name>hbase.hregion.memstore.mslab.enabled</name>
- <value>true</value>
- <description>
- Enables the MemStore-Local Allocation Buffer,
- a feature which works to prevent heap fragmentation under
- heavy write loads. This can reduce the frequency of stop-the-world
- GC pauses on large heaps.
- </description>
- </property>
- <property>
- <name>hbase.hregion.max.filesize</name>
- <value>10737418240</value>
- <description>
- Maximum HStoreFile size. If any one of a column families' HStoreFiles has
- grown to exceed this value, the hosting HRegion is split in two.
- Default: 1G.
- </description>
- </property>
- <property>
- <name>hbase.client.scanner.caching</name>
- <value>100</value>
- <description>Number of rows that will be fetched when calling next
- on a scanner if it is not served from (local, client) memory. Higher
- caching values will enable faster scanners but will eat up more memory
- and some calls of next may take longer and longer times when the cache is empty.
- Do not set this value such that the time between invocations is greater
- than the scanner timeout; i.e. hbase.regionserver.lease.period
- </description>
- </property>
- <property>
- <name>zookeeper.session.timeout</name>
- <value>60000</value>
- <description>ZooKeeper session timeout.
- HBase passes this to the zk quorum as suggested maximum time for a
- session (This setting becomes zookeeper's 'maxSessionTimeout'). See
- http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkSessions
- "The client sends a requested timeout, the server responds with the
- timeout that it can give the client. " In milliseconds.
- </description>
- </property>
- <property>
- <name>hbase.client.keyvalue.maxsize</name>
- <value>10485760</value>
- <description>Specifies the combined maximum allowed size of a KeyValue
- instance. This is to set an upper boundary for a single entry saved in a
- storage file. Since they cannot be split it helps avoiding that a region
- cannot be split any further because the data is too large. It seems wise
- to set this to a fraction of the maximum region size. Setting it to zero
- or less disables the check.
- </description>
- </property>
- <property>
- <name>hbase.hstore.compactionThreshold</name>
- <value>3</value>
- <description>
- If more than this number of HStoreFiles in any one HStore
- (one HStoreFile is written per flush of memstore) then a compaction
- is run to rewrite all HStoreFiles files as one. Larger numbers
- put off compaction but when it runs, it takes longer to complete.
- </description>
- </property>
- <property>
- <name>hbase.hstore.blockingStoreFiles</name>
- <value>10</value>
- <description>
- If more than this number of StoreFiles in any one Store
- (one StoreFile is written per flush of MemStore) then updates are
- blocked for this HRegion until a compaction is completed, or
- until hbase.hstore.blockingWaitTime has been exceeded.
- </description>
- </property>
- <property>
- <name>hfile.block.cache.size</name>
- <value>0.40</value>
- <description>
- Percentage of maximum heap (-Xmx setting) to allocate to block cache
- used by HFile/StoreFile. Default of 0.25 means allocate 25%.
- Set to 0 to disable but it's not recommended.
- </description>
- </property>
-
- <!-- The following properties configure authentication information for
- HBase processes when using Kerberos security. There are no default
- values, included here for documentation purposes -->
- <property>
- <name>hbase.master.keytab.file</name>
- <value></value>
- <description>Full path to the kerberos keytab file to use for logging in
- the configured HMaster server principal.
- </description>
- </property>
- <property>
- <name>hbase.master.kerberos.principal</name>
- <value></value>
- <description>Ex. "hbase/_HOST@EXAMPLE.COM". The kerberos principal name
- that should be used to run the HMaster process. The principal name should
- be in the form: user/hostname@DOMAIN. If "_HOST" is used as the hostname
- portion, it will be replaced with the actual hostname of the running
- instance.
- </description>
- </property>
- <property>
- <name>hbase.regionserver.keytab.file</name>
- <value></value>
- <description>Full path to the kerberos keytab file to use for logging in
- the configured HRegionServer server principal.
- </description>
- </property>
- <property>
- <name>hbase.regionserver.kerberos.principal</name>
- <value></value>
- <description>Ex. "hbase/_HOST@EXAMPLE.COM". The kerberos principal name
- that should be used to run the HRegionServer process. The principal name
- should be in the form: user/hostname@DOMAIN. If "_HOST" is used as the
- hostname portion, it will be replaced with the actual hostname of the
- running instance. An entry for this principal must exist in the file
- specified in hbase.regionserver.keytab.file
- </description>
- </property>
-
- <!-- Additional configuration specific to HBase security -->
- <property>
- <name>hbase.superuser</name>
- <value>hbase</value>
- <description>List of users or groups (comma-separated), who are allowed
- full privileges, regardless of stored ACLs, across the cluster.
- Only used when HBase security is enabled.
- </description>
- </property>
-
- <property>
- <name>hbase.security.authentication</name>
- <value>simple</value>
- </property>
-
- <property>
- <name>hbase.rpc.engine</name>
- <value>org.apache.hadoop.hbase.ipc.WritableRpcEngine</value>
- </property>
-
- <property>
- <name>hbase.security.authorization</name>
- <value>false</value>
- <description>Enables HBase authorization. Set the value of this property to false to disable HBase authorization.
- </description>
- </property>
-
- <property>
- <name>hbase.coprocessor.region.classes</name>
- <value></value>
- <description>A comma-separated list of Coprocessors that are loaded by
- default on all tables. For any override coprocessor method, these classes
- will be called in order. After implementing your own Coprocessor, just put
- it in HBase's classpath and add the fully qualified class name here.
- A coprocessor can also be loaded on demand by setting HTableDescriptor.
- </description>
- </property>
-
- <property>
- <name>hbase.coprocessor.master.classes</name>
- <value></value>
- <description>A comma-separated list of
- org.apache.hadoop.hbase.coprocessor.MasterObserver coprocessors that are
- loaded by default on the active HMaster process. For any implemented
- coprocessor methods, the listed classes will be called in order. After
- implementing your own MasterObserver, just put it in HBase's classpath
- and add the fully qualified class name here.
- </description>
- </property>
-
- <property>
- <name>hbase.zookeeper.property.clientPort</name>
- <value>2181</value>
- <description>Property from ZooKeeper's config zoo.cfg.
- The port at which the clients will connect.
- </description>
- </property>
-
- <!--
- The following three properties are used together to create the list of
- host:peer_port:leader_port quorum servers for ZooKeeper.
- -->
- <property>
- <name>hbase.zookeeper.quorum</name>
- <value>localhost</value>
- <description>Comma separated list of servers in the ZooKeeper Quorum.
- For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
- By default this is set to localhost for local and pseudo-distributed modes
- of operation. For a fully-distributed setup, this should be set to a full
- list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh
- this is the list of servers which we will start/stop ZooKeeper on.
- </description>
- </property>
- <!-- End of properties used to generate ZooKeeper host:port quorum list. -->
-
- <property>
- <name>dfs.support.append</name>
- <value>true</value>
- <description>Does HDFS allow appends to files?
- This is an hdfs config. set in here so the hdfs client will do append support.
- You must ensure that this config. is true serverside too when running hbase
- (You will have to restart your cluster after setting it).
- </description>
- </property>
-
- <property>
- <name>dfs.client.read.shortcircuit</name>
- <value>true</value>
- <description>Enable/Disable short circuit read for your client.
- Hadoop servers should be configured to allow short circuit read
- for the hbase user for this to take effect
- </description>
- </property>
-
- <property>
- <name>dfs.client.read.shortcircuit.skip.checksum</name>
- <value></value>
- <description>Enable/disbale skipping the checksum check</description>
- </property>
-
- <property>
- <name>hbase.zookeeper.useMulti</name>
- <value>true</value>
- <description>Instructs HBase to make use of ZooKeeper's multi-update functionality.
- This allows certain ZooKeeper operations to complete more quickly and prevents some issues
- with rare Replication failure scenarios (see the release note of HBASE-2611 for an example).ยท
- IMPORTANT: only set this to true if all ZooKeeper servers in the cluster are on version 3.4+
- and will not be downgraded. ZooKeeper versions before 3.4 do not support multi-update and will
- not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495).
- </description>
- </property>
- <property>
- <name>zookeeper.znode.parent</name>
- <value>/hbase-unsecure</value>
- <description>Root ZNode for HBase in ZooKeeper. All of HBase's ZooKeeper
- files that are configured with a relative path will go under this node.
- By default, all of HBase's ZooKeeper file path are configured with a
- relative path, so they will all go under this directory unless changed.
- </description>
- </property>
-
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/metainfo.xml
deleted file mode 100644
index 4c610db..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/metainfo.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?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>HBASE</name>
- <comment>Non-relational distributed database and centralized service for configuration management &
- synchronization
- </comment>
- <version>0.94.6.1.3.3.0</version>
- <components>
- <component>
- <name>HBASE_MASTER</name>
- <category>MASTER</category>
- <cardinality>1</cardinality>
- <dependencies>
- <dependency>
- <name>HDFS/HDFS_CLIENT</name>
- <scope>host</scope>
- <auto-deploy>
- <enabled>true</enabled>
- </auto-deploy>
- </dependency>
- <dependency>
- <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
- <scope>cluster</scope>
- <auto-deploy>
- <enabled>true</enabled>
- <co-locate>HBASE/HBASE_MASTER</co-locate>
- </auto-deploy>
- </dependency>
- </dependencies>
- <commandScript>
- <script>scripts/hbase_master.py</script>
- <scriptType>PYTHON</scriptType>
- <timeout>600</timeout>
- </commandScript>
- <customCommands>
- <customCommand>
- <name>DECOMMISSION</name>
- <commandScript>
- <script>scripts/hbase_master.py</script>
- <scriptType>PYTHON</scriptType>
- <timeout>600</timeout>
- </commandScript>
- </customCommand>
- </customCommands>
- </component>
-
- <component>
- <name>HBASE_REGIONSERVER</name>
- <category>SLAVE</category>
- <cardinality>1+</cardinality>
- <commandScript>
- <script>scripts/hbase_regionserver.py</script>
- <scriptType>PYTHON</scriptType>
- </commandScript>
- <customCommands>
- <customCommand>
- <name>DECOMMISSION</name>
- <commandScript>
- <script>scripts/hbase_regionserver.py</script>
- <scriptType>PYTHON</scriptType>
- <timeout>600</timeout>
- </commandScript>
- </customCommand>
- </customCommands>
- </component>
-
- <component>
- <name>HBASE_CLIENT</name>
- <category>CLIENT</category>
- <cardinality>0+</cardinality>
- <commandScript>
- <script>scripts/hbase_client.py</script>
- <scriptType>PYTHON</scriptType>
- </commandScript>
- </component>
- </components>
-
- <osSpecifics>
- <osSpecific>
- <osType>centos6</osType>
- <packages>
- <package>
- <type>rpm</type>
- <name>hbase</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>hbase-policy</config-type>
- <config-type>hbase-site</config-type>
- </configuration-dependencies>
-
- </service>
- </services>
-</metainfo>
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/files/hbaseSmokeVerify.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/files/hbaseSmokeVerify.sh b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/files/hbaseSmokeVerify.sh
deleted file mode 100644
index 39fe6e5..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/files/hbaseSmokeVerify.sh
+++ /dev/null
@@ -1,32 +0,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.
-#
-#
-conf_dir=$1
-data=$2
-echo "scan 'ambarismoketest'" | hbase --config $conf_dir shell > /tmp/hbase_chk_verify
-cat /tmp/hbase_chk_verify
-echo "Looking for $data"
-grep -q $data /tmp/hbase_chk_verify
-if [ "$?" -ne 0 ]
-then
- exit 1
-fi
-
-grep -q '1 row(s)' /tmp/hbase_chk_verify
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/__init__.py
deleted file mode 100644
index 5561e10..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/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.
-
-"""
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/functions.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/functions.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/functions.py
deleted file mode 100644
index 80b49e6..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/functions.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/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 os
-import re
-import math
-import datetime
-
-from resource_management.core.shell import checked_call
-
-def calc_xmn_from_xms(heapsize_str, xmn_percent, xmn_max):
- """
- @param heapsize_str: str (e.g '1000m')
- @param xmn_percent: float (e.g 0.2)
- @param xmn_max: integer (e.g 512)
- """
- heapsize = int(re.search('\d+',heapsize_str).group(0))
- heapsize_unit = re.search('\D+',heapsize_str).group(0)
- xmn_val = int(math.floor(heapsize*xmn_percent))
- xmn_val -= xmn_val % 8
-
- result_xmn_val = xmn_max if xmn_val > xmn_max else xmn_val
- return str(result_xmn_val) + heapsize_unit
-
-def get_unique_id_and_date():
- code, out = checked_call("hostid")
- id = out.strip()
-
- now = datetime.datetime.now()
- date = now.strftime("%M%d%y")
-
- return "id{id}_date{date}".format(id=id, date=date)
-
-def get_kinit_path(pathes_list):
- """
- @param pathes: comma separated list
- """
- kinit_path = ""
-
- for x in pathes_list:
- if not x:
- continue
-
- path = os.path.join(x,"kinit")
-
- if os.path.isfile(path):
- kinit_path = path
- break
-
- return kinit_path
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase.py
deleted file mode 100644
index bd33463..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/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 sys
-
-def hbase(type=None # 'master' or 'regionserver' or 'client'
- ):
- import params
-
- Directory( params.conf_dir,
- owner = params.hbase_user,
- group = params.user_group,
- recursive = True
- )
-
- XmlConfig( "hbase-site.xml",
- conf_dir = params.conf_dir,
- configurations = params.config['configurations']['hbase-site'],
- owner = params.hbase_user,
- group = params.user_group
- )
-
- XmlConfig( "hdfs-site.xml",
- conf_dir = params.conf_dir,
- configurations = params.config['configurations']['hdfs-site'],
- owner = params.hbase_user,
- group = params.user_group
- )
-
- if 'hbase-policy' in params.config['configurations']:
- XmlConfig( "hbase-policy.xml",
- configurations = params.config['configurations']['hbase-policy'],
- owner = params.hbase_user,
- group = params.user_group
- )
- # Manually overriding ownership of file installed by hadoop package
- else:
- File( format("{conf_dir}/hbase-policy.xml"),
- owner = params.hbase_user,
- group = params.user_group
- )
-
- hbase_TemplateConfig( 'hbase-env.sh')
-
- hbase_TemplateConfig( params.metric_prop_file_name,
- tag = 'GANGLIA-MASTER' if type == 'master' else 'GANGLIA-RS'
- )
-
- hbase_TemplateConfig( 'regionservers')
-
- if params.security_enabled:
- hbase_TemplateConfig( format("hbase_{type}_jaas.conf"))
-
- if type != "client":
- Directory( params.pid_dir,
- owner = params.hbase_user,
- recursive = True
- )
-
- Directory ( [params.tmp_dir, params.log_dir],
- owner = params.hbase_user,
- recursive = True
- )
-
-def hbase_TemplateConfig(name,
- tag=None
- ):
- import params
-
- TemplateConfig( format("{conf_dir}/{name}"),
- owner = params.hbase_user,
- template_tag = tag
- )
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_client.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_client.py
deleted file mode 100644
index 0f2a1bc..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_client.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/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 hbase import hbase
-
-
-class HbaseClient(Script):
- def install(self, env):
- self.install_packages(env)
- self.configure(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
-
- hbase(type='client')
-
- def status(self, env):
- raise ClientComponentHasNoStatus()
-
-#for tests
-def main():
- command_type = 'install'
- command_data_file = '/root/workspace/HBase/input.json'
- basedir = '/root/workspace/HBase/'
- stdoutfile = '/1.txt'
- sys.argv = ["", command_type, command_data_file, basedir, stdoutfile]
-
- HbaseClient().execute()
-
-if __name__ == "__main__":
- HbaseClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_master.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_master.py
deleted file mode 100644
index d94b4b4..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_master.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/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 hbase import hbase
-from hbase_service import hbase_service
-
-
-class HbaseMaster(Script):
- def install(self, env):
- self.install_packages(env)
- self.configure(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
-
- hbase(type='master')
-
- def start(self, env):
- import params
- env.set_params(params)
- self.configure(env) # for security
-
- hbase_service( 'master',
- action = 'start'
- )
-
- def stop(self, env):
- import params
- env.set_params(params)
-
- hbase_service( 'master',
- action = 'stop'
- )
-
- def status(self, env):
- import status_params
- env.set_params(status_params)
- pid_file = format("{pid_dir}/hbase-hbase-master.pid")
- check_process_status(pid_file)
-
-def main():
- command_type = sys.argv[1] if len(sys.argv)>1 else "install"
- print "Running "+command_type
- command_data_file = '/var/lib/ambari-agent/data/command-3.json'
- basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HBASE/package'
- stroutputf = '/1.txt'
- sys.argv = ["", command_type, command_data_file, basedir, stroutputf]
-
- HbaseMaster().execute()
-
-if __name__ == "__main__":
- HbaseMaster().execute()
- #main()
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_regionserver.py
deleted file mode 100644
index 2d91e75..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_regionserver.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/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 hbase import hbase
-from hbase_service import hbase_service
-
-
-class HbaseRegionServer(Script):
- def install(self, env):
- self.install_packages(env)
- self.configure(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
-
- hbase(type='regionserver')
-
- def start(self, env):
- import params
- env.set_params(params)
- self.configure(env) # for security
-
- hbase_service( 'regionserver',
- action = 'start'
- )
-
- def stop(self, env):
- import params
- env.set_params(params)
-
- hbase_service( 'regionserver',
- action = 'stop'
- )
-
- def status(self, env):
- import status_params
- env.set_params(status_params)
- pid_file = format("{pid_dir}/hbase-hbase-regionserver.pid")
- check_process_status(pid_file)
-
- def decommission(self, env):
- print "Decommission not yet implemented!"
-
-def main():
- command_type = sys.argv[1] if len(sys.argv)>1 else "stop"
- print "Running "+command_type
- command_data_file = '/root/workspace/HBase/input.json'
- basedir = '/root/workspace/HBase/main'
- sys.argv = ["", command_type, command_data_file, basedir]
-
- HbaseRegionServer().execute()
-
-if __name__ == "__main__":
- HbaseRegionServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/92583535/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_service.py
deleted file mode 100644
index 7a1248b..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/HBASE/package/scripts/hbase_service.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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 *
-
-def hbase_service(
- name,
- action = 'start'): # 'start' or 'stop' or 'status'
-
- import params
-
- role = name
- cmd = format("{daemon_script} --config {conf_dir}")
- pid_file = format("{pid_dir}/hbase-hbase-{role}.pid")
-
- daemon_cmd = None
- no_op_test = None
-
- if action == 'start':
- daemon_cmd = format("{cmd} start {role}")
- no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
- elif action == 'stop':
- daemon_cmd = format("{cmd} stop {role} && rm -f {pid_file}")
-
- if daemon_cmd is not None:
- Execute ( daemon_cmd,
- not_if = no_op_test,
- user = params.hbase_user
- )