http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/draining_servers.rb ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/draining_servers.rb b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/draining_servers.rb deleted file mode 100644 index 5bcb5b6..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/draining_servers.rb +++ /dev/null @@ -1,164 +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. -# - -# Add or remove servers from draining mode via zookeeper - -require 'optparse' -include Java - -import org.apache.hadoop.hbase.HBaseConfiguration -import org.apache.hadoop.hbase.client.HBaseAdmin -import org.apache.hadoop.hbase.zookeeper.ZKUtil -import org.apache.commons.logging.Log -import org.apache.commons.logging.LogFactory - -# Name of this script -NAME = "draining_servers" - -# Do command-line parsing -options = {} -optparse = OptionParser.new do |opts| - opts.banner = "Usage: ./hbase org.jruby.Main #{NAME}.rb [options] add|remove|list <hostname>|<host:port>|<servername> ..." - opts.separator 'Add remove or list servers in draining mode. Can accept either hostname to drain all region servers' + - 'in that host, a host:port pair or a host,port,startCode triplet. More than one server can be given separated by space' - opts.on('-h', '--help', 'Display usage information') do - puts opts - exit - end - options[:debug] = false - opts.on('-d', '--debug', 'Display extra debug logging') do - options[:debug] = true - end -end -optparse.parse! - -# Return array of servernames where servername is hostname+port+startcode -# comma-delimited -def getServers(admin) - serverInfos = admin.getClusterStatus().getServerInfo() - servers = [] - for server in serverInfos - servers << server.getServerName() - end - return servers -end - -def getServerNames(hostOrServers, config) - ret = [] - - for hostOrServer in hostOrServers - # check whether it is already serverName. No need to connect to cluster - parts = hostOrServer.split(',') - if parts.size() == 3 - ret << hostOrServer - else - admin = HBaseAdmin.new(config) if not admin - servers = getServers(admin) - - hostOrServer = hostOrServer.gsub(/:/, ",") - for server in servers - ret << server if server.start_with?(hostOrServer) - end - end - end - - admin.close() if admin - return ret -end - -def addServers(options, hostOrServers) - config = HBaseConfiguration.create() - servers = getServerNames(hostOrServers, config) - - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, "draining_servers", nil) - parentZnode = zkw.drainingZNode - - begin - for server in servers - node = ZKUtil.joinZNode(parentZnode, server) - ZKUtil.createAndFailSilent(zkw, node) - end - ensure - zkw.close() - end -end - -def removeServers(options, hostOrServers) - config = HBaseConfiguration.create() - servers = getServerNames(hostOrServers, config) - - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, "draining_servers", nil) - parentZnode = zkw.drainingZNode - - begin - for server in servers - node = ZKUtil.joinZNode(parentZnode, server) - ZKUtil.deleteNodeFailSilent(zkw, node) - end - ensure - zkw.close() - end -end - -# list servers in draining mode -def listServers(options) - config = HBaseConfiguration.create() - - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, "draining_servers", nil) - parentZnode = zkw.drainingZNode - - servers = ZKUtil.listChildrenNoWatch(zkw, parentZnode) - servers.each {|server| puts server} -end - -hostOrServers = ARGV[1..ARGV.size()] - -# Create a logger and disable the DEBUG-level annoying client logging -def configureLogging(options) - apacheLogger = LogFactory.getLog(NAME) - # Configure log4j to not spew so much - unless (options[:debug]) - logger = org.apache.log4j.Logger.getLogger("org.apache.hadoop.hbase") - logger.setLevel(org.apache.log4j.Level::WARN) - logger = org.apache.log4j.Logger.getLogger("org.apache.zookeeper") - logger.setLevel(org.apache.log4j.Level::WARN) - end - return apacheLogger -end - -# Create a logger and save it to ruby global -$LOG = configureLogging(options) -case ARGV[0] - when 'add' - if ARGV.length < 2 - puts optparse - exit 1 - end - addServers(options, hostOrServers) - when 'remove' - if ARGV.length < 2 - puts optparse - exit 1 - end - removeServers(options, hostOrServers) - when 'list' - listServers(options) - else - puts optparse - exit 3 -end
http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/hbaseSmokeVerify.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/hbaseSmokeVerify.sh b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/files/hbaseSmokeVerify.sh deleted file mode 100644 index 39fe6e5..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/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/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/__init__.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/__init__.py deleted file mode 100644 index 5561e10..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/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/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/functions.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/functions.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/functions.py deleted file mode 100644 index e6e7fb9..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/functions.py +++ /dev/null @@ -1,40 +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 http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase.py deleted file mode 100644 index 1734dda..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase.py +++ /dev/null @@ -1,138 +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 - -from resource_management import * -import sys - -def hbase(name=None # 'master' or 'regionserver' or 'client' - ): - import params - - - Directory( params.hbase_conf_dir, - owner = params.hbase_user, - group = params.user_group, - recursive = True - ) - - Directory ( params.tmp_dir, - owner = params.hbase_user, - recursive = True - ) - - XmlConfig( "hbase-site.xml", - conf_dir = params.hbase_conf_dir, - configurations = params.config['configurations']['hbase-site'], - configuration_attributes=params.config['configuration_attributes']['hbase-site'], - owner = params.hbase_user, - group = params.user_group - ) - - XmlConfig( "hdfs-site.xml", - conf_dir = params.hbase_conf_dir, - configurations = params.config['configurations']['hdfs-site'], - configuration_attributes=params.config['configuration_attributes']['hdfs-site'], - owner = params.hbase_user, - group = params.user_group - ) - - XmlConfig("hdfs-site.xml", - conf_dir=params.hadoop_conf_dir, - configurations=params.config['configurations']['hdfs-site'], - configuration_attributes=params.config['configuration_attributes']['hdfs-site'], - owner=params.hdfs_user, - group=params.user_group - ) - - if 'hbase-policy' in params.config['configurations']: - XmlConfig( "hbase-policy.xml", - conf_dir = params.hbase_conf_dir, - configurations = params.config['configurations']['hbase-policy'], - configuration_attributes=params.config['configuration_attributes']['hbase-policy'], - owner = params.hbase_user, - group = params.user_group - ) - # Manually overriding ownership of file installed by hadoop package - else: - File( format("{hbase_conf_dir}/hbase-policy.xml"), - owner = params.hbase_user, - group = params.user_group - ) - - File(format("{hbase_conf_dir}/hbase-env.sh"), - owner=params.hbase_user, - content=InlineTemplate(params.hbase_env_sh_template) - ) - - hbase_TemplateConfig( params.metric_prop_file_name, - tag = 'GANGLIA-MASTER' if name == 'master' else 'GANGLIA-RS' - ) - - hbase_TemplateConfig( 'regionservers') - - if params.security_enabled: - hbase_TemplateConfig( format("hbase_{name}_jaas.conf")) - - if name != "client": - Directory( params.pid_dir, - owner = params.hbase_user, - recursive = True - ) - - Directory (params.log_dir, - owner = params.hbase_user, - recursive = True - ) - - if (params.log4j_props != None): - File(format("{params.hbase_conf_dir}/log4j.properties"), - mode=0644, - group=params.user_group, - owner=params.hbase_user, - content=params.log4j_props - ) - elif (os.path.exists(format("{params.hbase_conf_dir}/log4j.properties"))): - File(format("{params.hbase_conf_dir}/log4j.properties"), - mode=0644, - group=params.user_group, - owner=params.hbase_user - ) - if name in ["regionserver","master"]: - params.HdfsDirectory(params.hbase_hdfs_root_dir, - action="create_delayed", - owner=params.hbase_user - ) - params.HdfsDirectory(params.hbase_staging_dir, - action="create_delayed", - owner=params.hbase_user, - mode=0711 - ) - params.HdfsDirectory(None, action="create") - -def hbase_TemplateConfig(name, - tag=None - ): - import params - - TemplateConfig( format("{hbase_conf_dir}/{name}"), - owner = params.hbase_user, - template_tag = tag - ) http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py deleted file mode 100644 index 043ad11..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_client.py +++ /dev/null @@ -1,43 +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(name='client') - - def status(self, env): - raise ClientComponentHasNoStatus() - - -if __name__ == "__main__": - HbaseClient().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_decommission.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_decommission.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_decommission.py deleted file mode 100644 index fb1379a..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_decommission.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. - -""" - -from resource_management import * - - -def hbase_decommission(env): - import params - - env.set_params(params) - kinit_cmd = params.kinit_cmd - - File(params.region_drainer, - content=StaticFile("draining_servers.rb"), - mode=0755 - ) - - if params.hbase_excluded_hosts and params.hbase_excluded_hosts.split(","): - hosts = params.hbase_excluded_hosts.split(",") - elif params.hbase_included_hosts and params.hbase_included_hosts.split(","): - hosts = params.hbase_included_hosts.split(",") - - if params.hbase_drain_only: - for host in hosts: - if host: - regiondrainer_cmd = format( - "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_drainer} remove {host}") - Execute(regiondrainer_cmd, - user=params.hbase_user, - logoutput=True - ) - pass - pass - - else: - for host in hosts: - if host: - regiondrainer_cmd = format( - "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_drainer} add {host}") - regionmover_cmd = format( - "{kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} org.jruby.Main {region_mover} unload {host}") - - Execute(regiondrainer_cmd, - user=params.hbase_user, - logoutput=True - ) - - Execute(regionmover_cmd, - user=params.hbase_user, - logoutput=True - ) - pass - pass - pass - - - pass http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py deleted file mode 100644 index a26254d..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_master.py +++ /dev/null @@ -1,70 +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 -from hbase_decommission import hbase_decommission - - -class HbaseMaster(Script): - def install(self, env): - self.install_packages(env) - - def configure(self, env): - import params - env.set_params(params) - - hbase(name='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_user}-master.pid") - check_process_status(pid_file) - - def decommission(self, env): - import params - env.set_params(params) - - hbase_decommission(env) - - -if __name__ == "__main__": - HbaseMaster().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py deleted file mode 100644 index e72dad4..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_regionserver.py +++ /dev/null @@ -1,62 +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) - - def configure(self, env): - import params - env.set_params(params) - - hbase(name='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_user}-regionserver.pid") - check_process_status(pid_file) - -if __name__ == "__main__": - HbaseRegionServer().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_service.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/hbase_service.py deleted file mode 100644 index 1ebc942..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/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 {hbase_conf_dir}") - pid_file = format("{pid_dir}/hbase-{hbase_user}-{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 -p `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 - ) http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/params.py deleted file mode 100644 index 6672b3b..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/params.py +++ /dev/null @@ -1,116 +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 functions import calc_xmn_from_xms -from resource_management import * -import status_params - -# server configurations -config = Script.get_config() -exec_tmp_dir = Script.get_tmp_dir() - -hbase_conf_dir = "/etc/hbase/conf" -daemon_script = "/usr/lib/hbase/bin/hbase-daemon.sh" -region_mover = "/usr/lib/hbase/bin/region_mover.rb" -region_drainer = "/usr/lib/hbase/bin/draining_servers.rb" -hbase_cmd = "/usr/lib/hbase/bin/hbase" -hbase_excluded_hosts = config['commandParams']['excluded_hosts'] -hbase_drain_only = default("/commandParams/mark_draining_only",False) -hbase_included_hosts = config['commandParams']['included_hosts'] - -hbase_user = status_params.hbase_user -hbase_principal_name = config['configurations']['hbase-env']['hbase_principal_name'] -smokeuser = config['configurations']['cluster-env']['smokeuser'] -security_enabled = config['configurations']['cluster-env']['security_enabled'] -user_group = config['configurations']['cluster-env']['user_group'] - -# this is "hadoop-metrics2-hbase.properties" for 2.x stacks -metric_prop_file_name = "hadoop-metrics.properties" - -# not supporting 32 bit jdk. -java64_home = config['hostLevelParams']['java_home'] -hbase_env_sh_template = config['configurations']['hbase-env']['content'] - -log_dir = config['configurations']['hbase-env']['hbase_log_dir'] -master_heapsize = config['configurations']['hbase-env']['hbase_master_heapsize'] - -regionserver_heapsize = config['configurations']['hbase-env']['hbase_regionserver_heapsize'] -regionserver_xmn_max = config['configurations']['hbase-env']['hbase_regionserver_xmn_max'] -regionserver_xmn_percent = config['configurations']['hbase-env']['hbase_regionserver_xmn_ratio'] -regionserver_xmn_size = calc_xmn_from_xms(regionserver_heapsize, regionserver_xmn_percent, regionserver_xmn_max) - -pid_dir = status_params.pid_dir -tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir'] - -client_jaas_config_file = format("{hbase_conf_dir}/hbase_client_jaas.conf") -master_jaas_config_file = format("{hbase_conf_dir}/hbase_master_jaas.conf") -regionserver_jaas_config_file = format("{hbase_conf_dir}/hbase_regionserver_jaas.conf") - -ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # is not passed when ganglia is not present -ganglia_server_host = '' if len(ganglia_server_hosts) == 0 else ganglia_server_hosts[0] - -rs_hosts = config['clusterHostInfo']['slave_hosts'] #if hbase_rs_hosts not given it is assumed that region servers on same nodes as slaves - -smoke_test_user = config['configurations']['cluster-env']['smokeuser'] -smokeuser_permissions = "RWXCA" -service_check_data = functions.get_unique_id_and_date() - -if security_enabled: - _hostname_lowercase = config['hostname'].lower() - master_jaas_princ = config['configurations']['hbase-site']['hbase.master.kerberos.principal'].replace('_HOST',_hostname_lowercase) - regionserver_jaas_princ = config['configurations']['hbase-site']['hbase.regionserver.kerberos.principal'].replace('_HOST',_hostname_lowercase) - -master_keytab_path = config['configurations']['hbase-site']['hbase.master.keytab.file'] -regionserver_keytab_path = config['configurations']['hbase-site']['hbase.regionserver.keytab.file'] -smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab'] -hbase_user_keytab = config['configurations']['hbase-env']['hbase_user_keytab'] -kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"]) -if security_enabled: - kinit_cmd = format("{kinit_path_local} -kt {hbase_user_keytab} {hbase_principal_name};") -else: - kinit_cmd = "" - -#log4j.properties -if (('hbase-log4j' in config['configurations']) and ('content' in config['configurations']['hbase-log4j'])): - log4j_props = config['configurations']['hbase-log4j']['content'] -else: - log4j_props = None - -#hdfs directories -hbase_hdfs_root_dir = config['configurations']['hbase-site']['hbase.rootdir'] -hbase_staging_dir = "/apps/hbase/staging" -#for create_hdfs_directory -hostname = config["hostname"] -hadoop_conf_dir = "/etc/hadoop/conf" -hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] -hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] -hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] -kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"]) -import functools -#create partial functions with common arguments for every HdfsDirectory call -#to create hdfs directory we need to call params.HdfsDirectory in code -HdfsDirectory = functools.partial( - HdfsDirectory, - conf_dir=hadoop_conf_dir, - hdfs_user=hdfs_user, - security_enabled = security_enabled, - keytab = hdfs_user_keytab, - kinit_path_local = kinit_path_local -) http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py deleted file mode 100644 index 9ab7f2d..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/service_check.py +++ /dev/null @@ -1,80 +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 functions - - -class HbaseServiceCheck(Script): - def service_check(self, env): - import params - env.set_params(params) - - output_file = "/apps/hbase/data/ambarismoketest" - test_cmd = format("fs -test -e {output_file}") - smokeuser_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smoke_test_user};") if params.security_enabled else "" - hbase_servicecheck_file = format("{exec_tmp_dir}/hbase-smoke.sh") - - File( format("{exec_tmp_dir}/hbaseSmokeVerify.sh"), - content = StaticFile("hbaseSmokeVerify.sh"), - mode = 0755 - ) - - File( hbase_servicecheck_file, - mode = 0755, - content = Template('hbase-smoke.sh.j2') - ) - - if params.security_enabled: - hbase_grant_premissions_file = format("{exec_tmp_dir}/hbase_grant_permissions.sh") - grantprivelegecmd = format("{kinit_cmd} hbase shell {hbase_grant_premissions_file}") - - File( hbase_grant_premissions_file, - owner = params.hbase_user, - group = params.user_group, - mode = 0644, - content = Template('hbase_grant_permissions.j2') - ) - - Execute( grantprivelegecmd, - user = params.hbase_user, - ) - - servicecheckcmd = format("{smokeuser_kinit_cmd} hbase --config {hbase_conf_dir} shell {hbase_servicecheck_file}") - smokeverifycmd = format("{smokeuser_kinit_cmd} {exec_tmp_dir}/hbaseSmokeVerify.sh {hbase_conf_dir} {service_check_data}") - - Execute( servicecheckcmd, - tries = 3, - try_sleep = 5, - user = params.smoke_test_user, - logoutput = True - ) - - Execute ( smokeverifycmd, - tries = 3, - try_sleep = 5, - user = params.smoke_test_user, - logoutput = True - ) - - -if __name__ == "__main__": - HbaseServiceCheck().execute() - http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/status_params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/status_params.py deleted file mode 100644 index 850ec8b..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/scripts/status_params.py +++ /dev/null @@ -1,26 +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']['hbase-env']['hbase_pid_dir'] -hbase_user = config['configurations']['hbase-env']['hbase_user'] http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-MASTER.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-MASTER.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-MASTER.j2 deleted file mode 100644 index 6973569..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-MASTER.j2 +++ /dev/null @@ -1,68 +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. -#} - -# 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. - -# See http://wiki.apache.org/hadoop/GangliaMetrics -# -# Make sure you know whether you are using ganglia 3.0 or 3.1. -# If 3.1, you will have to patch your hadoop instance with HADOOP-4675 -# And, yes, this file is named hadoop-metrics.properties rather than -# hbase-metrics.properties because we're leveraging the hadoop metrics -# package and hadoop-metrics.properties is an hardcoded-name, at least -# for the moment. -# -# See also http://hadoop.apache.org/hbase/docs/current/metrics.html - -# HBase-specific configuration to reset long-running stats (e.g. compactions) -# If this variable is left out, then the default is no expiration. -hbase.extendedperiod = 3600 - -# Configuration of the "hbase" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext -hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -hbase.period=10 -hbase.servers={{ganglia_server_host}}:8663 - -# Configuration of the "jvm" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext -jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -jvm.period=10 -jvm.servers={{ganglia_server_host}}:8663 - -# Configuration of the "rpc" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext -rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -rpc.period=10 -rpc.servers={{ganglia_server_host}}:8663 http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-RS.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-RS.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-RS.j2 deleted file mode 100644 index e0a3ea2..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties-GANGLIA-RS.j2 +++ /dev/null @@ -1,68 +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. -#} - -# 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. - -# See http://wiki.apache.org/hadoop/GangliaMetrics -# -# Make sure you know whether you are using ganglia 3.0 or 3.1. -# If 3.1, you will have to patch your hadoop instance with HADOOP-4675 -# And, yes, this file is named hadoop-metrics.properties rather than -# hbase-metrics.properties because we're leveraging the hadoop metrics -# package and hadoop-metrics.properties is an hardcoded-name, at least -# for the moment. -# -# See also http://hadoop.apache.org/hbase/docs/current/metrics.html - -# HBase-specific configuration to reset long-running stats (e.g. compactions) -# If this variable is left out, then the default is no expiration. -hbase.extendedperiod = 3600 - -# Configuration of the "hbase" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext -hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -hbase.period=10 -hbase.servers={{ganglia_server_host}}:8656 - -# Configuration of the "jvm" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext -jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -jvm.period=10 -jvm.servers={{ganglia_server_host}}:8656 - -# Configuration of the "rpc" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext -rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -rpc.period=10 -rpc.servers={{ganglia_server_host}}:8656 http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties.j2 deleted file mode 100644 index e3f602d..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hadoop-metrics.properties.j2 +++ /dev/null @@ -1,69 +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. -#} - - -# 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. - -# See http://wiki.apache.org/hadoop/GangliaMetrics -# -# Make sure you know whether you are using ganglia 3.0 or 3.1. -# If 3.1, you will have to patch your hadoop instance with HADOOP-4675 -# And, yes, this file is named hadoop-metrics.properties rather than -# hbase-metrics.properties because we're leveraging the hadoop metrics -# package and hadoop-metrics.properties is an hardcoded-name, at least -# for the moment. -# -# See also http://hadoop.apache.org/hbase/docs/current/metrics.html - -# HBase-specific configuration to reset long-running stats (e.g. compactions) -# If this variable is left out, then the default is no expiration. -hbase.extendedperiod = 3600 - -# Configuration of the "hbase" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext -hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -hbase.period=10 -hbase.servers={{ganglia_server_host}}:8663 - -# Configuration of the "jvm" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext -jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -jvm.period=10 -jvm.servers={{ganglia_server_host}}:8663 - -# Configuration of the "rpc" context for ganglia -# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter) -# rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext -rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31 -rpc.period=10 -rpc.servers={{ganglia_server_host}}:8663 http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase-smoke.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase-smoke.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase-smoke.sh.j2 deleted file mode 100644 index 458da95..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase-smoke.sh.j2 +++ /dev/null @@ -1,44 +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. -#} - -# -# -# 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. -# -# -disable 'ambarismoketest' -drop 'ambarismoketest' -create 'ambarismoketest','family' -put 'ambarismoketest','row01','family:col01','{{service_check_data}}' -scan 'ambarismoketest' -exit \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_client_jaas.conf.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_client_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_client_jaas.conf.j2 deleted file mode 100644 index 0b1b8aa..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_client_jaas.conf.j2 +++ /dev/null @@ -1,24 +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. -#} - - -Client { -com.sun.security.auth.module.Krb5LoginModule required -useKeyTab=false -useTicketCache=true; -}; http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_grant_permissions.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_grant_permissions.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_grant_permissions.j2 deleted file mode 100644 index d65dc8b..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_grant_permissions.j2 +++ /dev/null @@ -1,40 +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. -#} - - -# -# 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. -# -# -grant '{{smoke_test_user}}', '{{smokeuser_permissions}}' -exit \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_master_jaas.conf.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_master_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_master_jaas.conf.j2 deleted file mode 100644 index a93c36c..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_master_jaas.conf.j2 +++ /dev/null @@ -1,26 +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. -#} - -Client { -com.sun.security.auth.module.Krb5LoginModule required -useKeyTab=true -storeKey=true -useTicketCache=false -keyTab="{{master_keytab_path}}" -principal="{{master_jaas_princ}}"; -}; http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_regionserver_jaas.conf.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_regionserver_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_regionserver_jaas.conf.j2 deleted file mode 100644 index 7097481..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/hbase_regionserver_jaas.conf.j2 +++ /dev/null @@ -1,26 +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. -#} - -Client { -com.sun.security.auth.module.Krb5LoginModule required -useKeyTab=true -storeKey=true -useTicketCache=false -keyTab="{{regionserver_keytab_path}}" -principal="{{regionserver_jaas_princ}}"; -}; http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/regionservers.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/regionservers.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/regionservers.j2 deleted file mode 100644 index 4f7f398..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/package/templates/regionservers.j2 +++ /dev/null @@ -1,21 +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. -#} - - -{% for host in rs_hosts %}{{host}} -{% endfor %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/alerts.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/alerts.json b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/alerts.json deleted file mode 100644 index c90fdbc..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/alerts.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "HDFS":{ - "service": [ - { - "name": "datanode_process_percent", - "label": "Percent DataNodes Available", - "description": "This alert is triggered if the number of down DataNodes in the cluster is greater than the configured critical threshold. It aggregates the results of DataNode process checks.", - "interval": 1, - "scope": "SERVICE", - "enabled": true, - "source": { - "type": "AGGREGATE", - "alert_name": "datanode_process", - "reporting": { - "ok": { - "text": "affected: [{1}], total: [{0}]" - }, - "warning": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.1 - }, - "critical": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.3 - } - } - } - }, - { - "name": "datanode_storage_percent", - "label": "Percent DataNodes With Available Space", - "description": "This service-level alert is triggered if the storage on a certain percentage of DataNodes exceeds either the warning or critical threshold values.", - "interval": 1, - "scope": "SERVICE", - "enabled": true, - "source": { - "type": "AGGREGATE", - "alert_name": "datanode_storage", - "reporting": { - "ok": { - "text": "affected: [{1}], total: [{0}]" - }, - "warning": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.1 - }, - "critical": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.3 - } - } - } - }, - { - "name": "journalnode_process_percent", - "label": "Percent JournalNodes Available", - "description": "This alert is triggered if the number of down JournalNodes in the cluster is greater than the configured critical threshold. It aggregates the results of JournalNode process checks.", - "interval": 1, - "scope": "SERVICE", - "enabled": true, - "source": { - "type": "AGGREGATE", - "alert_name": "journalnode_process", - "reporting": { - "ok": { - "text": "affected: [{1}], total: [{0}]" - }, - "warning": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.33 - }, - "critical": { - "text": "affected: [{1}], total: [{0}]", - "value": 0.50 - } - } - } - } - ], - "NAMENODE": [ - { - "name": "namenode_webui", - "label": "NameNode Web UI", - "description": "This host-level alert is triggered if the NameNode Web UI is unreachable.", - "interval": 1, - "scope": "ANY", - "enabled": true, - "source": { - "type": "WEB", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "HTTP {0} response in {2:.3f} seconds" - }, - "warning":{ - "text": "HTTP {0} response in {2:.3f} seconds" - }, - "critical": { - "text": "Connection failed to {1}" - } - } - } - }, - { - "name": "namenode_cpu", - "label": "NameNode Host CPU Utilization", - "description": "This host-level alert is triggered if CPU utilization of the NameNode exceeds certain warning and critical thresholds. It checks the NameNode JMX Servlet for the SystemCPULoad property. The threshold values are in percent.", - "interval": 5, - "scope": "ANY", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "{1} CPU, load {0:.1%}" - }, - "warning": { - "text": "{1} CPU, load {0:.1%}", - "value": 200 - }, - "critical": { - "text": "{1} CPU, load {0:.1%}", - "value": 250 - }, - "units" : "%" - }, - "jmx": { - "property_list": [ - "java.lang:type=OperatingSystem/SystemCpuLoad", - "java.lang:type=OperatingSystem/AvailableProcessors" - ], - "value": "{0} * 100" - } - } - }, - { - "name": "namenode_hdfs_blocks_health", - "label": "NameNode Blocks Health", - "description": "This service-level alert is triggered if the number of corrupt or missing blocks exceeds the configured critical threshold. The threshold values are in blocks.", - "interval": 2, - "scope": "ANY", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "Total Blocks:[{1}], Missing Blocks:[{0}]" - }, - "warning": { - "text": "Total Blocks:[{1}], Missing Blocks:[{0}]", - "value": 1 - }, - "critical": { - "text": "Total Blocks:[{1}], Missing Blocks:[{0}]", - "value": 1 - }, - "units" : "Blocks" - }, - "jmx": { - "property_list": [ - "Hadoop:service=NameNode,name=FSNamesystemMetrics/MissingBlocks", - "Hadoop:service=NameNode,name=FSNamesystemMetrics/BlocksTotal" - ], - "value": "{0}" - } - } - }, - { - "name": "namenode_hdfs_capacity_utilization", - "label": "HDFS Capacity Utilization", - "description": "This service-level alert is triggered if the HDFS capacity utilization exceeds the configured warning and critical thresholds. It checks the NameNode JMX Servlet for the CapacityUsed and CapacityRemaining properties. The threshold values are in percent.", - "interval": 2, - "scope": "ANY", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "Capacity Used:[{2:d}%, {0}], Capacity Remaining:[{1}]" - }, - "warning": { - "text": "Capacity Used:[{2:d}%, {0}], Capacity Remaining:[{1}]", - "value": 80 - }, - "critical": { - "text": "Capacity Used:[{2:d}%, {0}], Capacity Remaining:[{1}]", - "value": 90 - }, - "units" : "%" - }, - "jmx": { - "property_list": [ - "Hadoop:service=NameNode,name=FSNamesystemState/CapacityUsed", - "Hadoop:service=NameNode,name=FSNamesystemState/CapacityRemaining" - ], - "value": "{0}/({0} + {1}) * 100" - } - } - }, - { - "name": "namenode_rpc_latency", - "label": "NameNode RPC Latency", - "description": "This host-level alert is triggered if the NameNode RPC latency exceeds the configured critical threshold. Typically an increase in the RPC processing time increases the RPC queue length, causing the average queue wait time to increase for NameNode operations. The threshold values are in milliseconds.", - "interval": 2, - "scope": "ANY", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]" - }, - "warning": { - "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", - "value": 3000 - }, - "critical": { - "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", - "value": 5000 - }, - "units" : "ms" - }, - "jmx": { - "property_list": [ - "Hadoop:service=NameNode,name=RpcActivityForPort*/RpcQueueTime_avg_time", - "Hadoop:service=NameNode,name=RpcActivityForPort*/RpcProcessingTime_avg_time" - ], - "value": "{0}" - } - } - }, - { - "name": "namenode_directory_status", - "label": "NameNode Directory Status", - "description": "This host-level alert is triggered if any of the the NameNode's NameDirStatuses metric reports a failed directory. The threshold values are in the number of directories that are not healthy.", - "interval": 1, - "scope": "ANY", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.http.address}}", - "https": "{{hdfs-site/dfs.https.port}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "Directories are healthy" - }, - "warning": { - "text": "Failed directory count: {1}", - "value": 1 - }, - "critical": { - "text": "Failed directory count: {1}", - "value": 1 - }, - "units" : "Dirs" - }, - "jmx": { - "property_list": [ - "Hadoop:service=NameNode,name=NameNodeInfo/NameDirStatuses" - ], - "value": "calculate(args)\ndef calculate(args):\n import json\n json_statuses = json.loads({0})\n return len(json_statuses['failed']) if 'failed' in json_statuses else 0" - } - } - }, - { - "name": "namenode_process", - "label": "NameNode Process", - "description": "This host-level alert is triggered if the NameNode process cannot be confirmed to be up and listening on the network.", - "interval": 1, - "scope": "ANY", - "enabled": true, - "source": { - "type": "PORT", - "uri": "{{hdfs-site/dfs.namenode.http-address}}", - "default_port": 50070, - "reporting": { - "ok": { - "text": "TCP OK - {0:.3f}s response on port {1}" - }, - "warning": { - "text": "TCP OK - {0:.3f}s response on port {1}", - "value": 1.5 - }, - "critical": { - "text": "Connection failed: {0} to {1}:{2}", - "value": 5.0 - } - } - } - } - ], - "SECONDARY_NAMENODE": [ - { - "name": "secondary_namenode_process", - "label": "Secondary NameNode Process", - "description": "This host-level alert is triggered if the Secondary NameNode process cannot be confirmed to be up and listening on the network.", - "interval": 1, - "scope": "ANY", - "enabled": true, - "source": { - "type": "PORT", - "uri": "{{hdfs-site/dfs.secondary.http.address}}", - "default_port": 50090, - "reporting": { - "ok": { - "text": "TCP OK - {0:.3f}s response on port {1}" - }, - "warning": { - "text": "TCP OK - {0:.3f}s response on port {1}", - "value": 1.5 - }, - "critical": { - "text": "Connection failed: {0} to {1}:{2}", - "value": 5.0 - } - } - } - } - ], - "JOURNALNODE": [ - { - "name": "journalnode_process", - "label": "JournalNode Process", - "description": "This host-level alert is triggered if the JournalNode process cannot be confirmed to be up and listening on the network.", - "interval": 1, - "scope": "HOST", - "enabled": true, - "source": { - "type": "PORT", - "uri": "{{hdfs-site/dfs.journalnode.http-address}}", - "default_port": 8480, - "reporting": { - "ok": { - "text": "TCP OK - {0:.3f}s response on port {1}" - }, - "warning": { - "text": "TCP OK - {0:.3f}s response on port {1}", - "value": 1.5 - }, - "critical": { - "text": "Connection failed: {0} to {1}:{2}", - "value": 5.0 - } - } - } - } - ], - "DATANODE": [ - { - "name": "datanode_process", - "label": "DataNode Process", - "description": "This host-level alert is triggered if the individual DataNode processes cannot be established to be up and listening on the network.", - "interval": 1, - "scope": "HOST", - "enabled": true, - "source": { - "type": "PORT", - "uri": "{{hdfs-site/dfs.datanode.address}}", - "default_port": 50010, - "reporting": { - "ok": { - "text": "TCP OK - {0:.3f}s response on port {1}" - }, - "warning": { - "text": "TCP OK - {0:.3f}s response on port {1}", - "value": 1.5 - }, - "critical": { - "text": "Connection failed: {0} to {1}:{2}", - "value": 5.0 - } - } - } - }, - { - "name": "datanode_webui", - "label": "DataNode Web UI", - "description": "This host-level alert is triggered if the DataNode Web UI is unreachable.", - "interval": 1, - "scope": "HOST", - "enabled": true, - "source": { - "type": "WEB", - "uri": { - "http": "{{hdfs-site/dfs.datanode.http.address}}", - "https": "{{hdfs-site/dfs.datanode.https.address}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "HTTP {0} response in {2:.3f} seconds" - }, - "warning":{ - "text": "HTTP {0} response in {2:.3f} seconds" - }, - "critical": { - "text": "Connection failed to {1}" - } - } - } - }, - { - "name": "datanode_storage", - "label": "DataNode Storage", - "description": "This host-level alert is triggered if storage capacity if full on the DataNode. It checks the DataNode JMX Servlet for the Capacity and Remaining properties. The threshold values are in percent.", - "interval": 2, - "scope": "HOST", - "enabled": true, - "source": { - "type": "METRIC", - "uri": { - "http": "{{hdfs-site/dfs.datanode.http.address}}", - "https": "{{hdfs-site/dfs.datanode.https.address}}", - "https_property": "{{hdfs-site/dfs.https.enable}}", - "https_property_value": "true" - }, - "reporting": { - "ok": { - "text": "Remaining Capacity:[{0}], Total Capacity:[{2:d}% Used, {1}]" - }, - "warning": { - "text": "Remaining Capacity:[{0}], Total Capacity:[{2:d}% Used, {1}]", - "value": 80 - }, - "critical": { - "text": "Remaining Capacity:[{0}], Total Capacity:[{2:d}% Used, {1}]", - "value": 90 - }, - "units" : "%" - }, - "jmx": { - "property_list": [ - "Hadoop:service=DataNode,name=FSDatasetState-*/Remaining", - "Hadoop:service=DataNode,name=FSDatasetState-*/Capacity" - ], - "value": "({1} - {0})/{1} * 100" - } - } - } - ] - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/23b7c110/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/configuration/core-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/configuration/core-site.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/configuration/core-site.xml deleted file mode 100644 index 76215b9..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/configuration/core-site.xml +++ /dev/null @@ -1,254 +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. - --> - -<!-- Put site-specific property overrides in this file. --> - -<configuration supports_final="true" xmlns:xi="http://www.w3.org/2001/XInclude"> - -<!-- i/o properties --> - - <property> - <name>io.file.buffer.size</name> - <value>131072</value> - <description>The size of buffer for use in sequence files. - The size of this buffer should probably be a multiple of hardware - page size (4096 on Intel x86), and it determines how much data is - buffered during read and write operations.</description> - </property> - - <property> - <name>io.serializations</name> - <value>org.apache.hadoop.io.serializer.WritableSerialization</value> - <description> A list of comma-delimited serialization classes that can be used for obtaining serializers and deserializers. - </description> - </property> - - <property> - <name>io.compression.codecs</name> - <value>org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec</value> - <description>A list of the compression codec classes that can be used - for compression/decompression.</description> - </property> - -<!-- file system properties --> - - <property> - <name>fs.default.name</name> - <!-- cluster variant --> - <value>hdfs://localhost:8020</value> - <description>The name of the default file system. Either the - literal string "local" or a host:port for NDFS.</description> - <final>true</final> - </property> - - <property> - <name>fs.trash.interval</name> - <value>360</value> - <description>Number of minutes between trash checkpoints. - If zero, the trash feature is disabled. - </description> - </property> - - <property> - <name>fs.checkpoint.dir</name> - <value>/hadoop/hdfs/namesecondary</value> - <description>Determines where on the local filesystem the DFS secondary - name node should store the temporary images to merge. - If this is a comma-delimited list of directories then the image is - replicated in all of the directories for redundancy. - </description> - </property> - - <property> - <name>fs.checkpoint.edits.dir</name> - <value>${fs.checkpoint.dir}</value> - <description>Determines where on the local filesystem the DFS secondary - name node should store the temporary edits to merge. - If this is a comma-delimited list of directoires then teh edits is - replicated in all of the directoires for redundancy. - Default value is same as fs.checkpoint.dir - </description> - </property> - - <property> - <name>fs.checkpoint.period</name> - <value>21600</value> - <description>The number of seconds between two periodic checkpoints. - </description> - </property> - - <property> - <name>fs.checkpoint.size</name> - <value>67108864</value> - <description>The size of the current edit log (in bytes) that triggers - a periodic checkpoint even if the fs.checkpoint.period hasn't expired. - </description> - </property> - - <!-- ipc properties: copied from kryptonite configuration --> - <property> - <name>ipc.client.idlethreshold</name> - <value>8000</value> - <description>Defines the threshold number of connections after which - connections will be inspected for idleness. - </description> - </property> - - <property> - <name>ipc.client.connection.maxidletime</name> - <value>30000</value> - <description>The maximum time after which a client will bring down the - connection to the server. - </description> - </property> - - <property> - <name>ipc.client.connect.max.retries</name> - <value>50</value> - <description>Defines the maximum number of retries for IPC connections.</description> - </property> - - <!-- Web Interface Configuration --> - <property> - <name>webinterface.private.actions</name> - <value>false</value> - <description> If set to true, the web interfaces of JT and NN may contain - actions, such as kill job, delete file, etc., that should - not be exposed to public. Enable this option if the interfaces - are only reachable by those who have the right authorization. - </description> - </property> - - <property> - <name>hadoop.security.authentication</name> - <value>simple</value> - <description> - Set the authentication for the cluster. Valid values are: simple or - kerberos. - </description> - </property> -<property> - <name>hadoop.security.authorization</name> - <value>false</value> - <description> - Enable authorization for different protocols. - </description> -</property> - - <property> - <name>hadoop.security.auth_to_local</name> - <value> - RULE:[2:$1@$0]([rn]m@.*)s/.*/yarn/ - RULE:[2:$1@$0](jhs@.*)s/.*/mapred/ - RULE:[2:$1@$0]([nd]n@.*)s/.*/hdfs/ - RULE:[2:$1@$0](hm@.*)s/.*/hbase/ - RULE:[2:$1@$0](rs@.*)s/.*/hbase/ - DEFAULT - </value> -<description>The mapping from kerberos principal names to local OS user names. - So the default rule is just "DEFAULT" which takes all principals in your default domain to their first component. - "[email protected]" and "omalley/[email protected]" to "omalley", if your default domain is APACHE.ORG. -The translations rules have 3 sections: - base filter substitution -The base consists of a number that represents the number of components in the principal name excluding the realm and the pattern for building the name from the sections of the principal name. The base uses $0 to mean the realm, $1 to mean the first component and $2 to mean the second component. - -[1:$1@$0] translates "[email protected]" to "[email protected]" -[2:$1] translates "omalley/[email protected]" to "omalley" -[2:$1%$2] translates "omalley/[email protected]" to "omalley%admin" - -The filter is a regex in parens that must the generated string for the rule to apply. - -"(.*%admin)" will take any string that ends in "%admin" -"(.*@ACME.COM)" will take any string that ends in "@ACME.COM" - -Finally, the substitution is a sed rule to translate a regex into a fixed string. - -"s/@ACME\.COM//" removes the first instance of "@ACME.COM". -"s/@[A-Z]*\.COM//" removes the first instance of "@" followed by a name followed by ".COM". -"s/X/Y/g" replaces all of the "X" in the name with "Y" - -So, if your default realm was APACHE.ORG, but you also wanted to take all principals from ACME.COM that had a single component "[email protected]", you'd do: - -RULE:[1:$1@$0]([email protected])s/@.// -DEFAULT - -To also translate the names with a second component, you'd make the rules: - -RULE:[1:$1@$0]([email protected])s/@.// -RULE:[2:$1@$0]([email protected])s/@.// -DEFAULT - -If you want to treat all principals from APACHE.ORG with /admin as "admin", your rules would look like: - -RULE[2:$1%$2@$0](.%[email protected])s/./admin/ -DEFAULT - </description> - </property> - -<!-- -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("hcat_user").groups</name> - <value></value> - <description> - Proxy group for Hadoop. - </description> -</property> - -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("hcat_user").hosts</name> - <value></value> - <description> - Proxy host for Hadoop. - </description> -</property> - -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("oozie_user").groups</name> - <value></value> - <description> - Proxy group for Hadoop. - </description> -</property> - -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("oozie_user").hosts</name> - <value></value> - <description> - Proxy host for Hadoop. - </description> -</property> - -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("templeton_user").groups</name> - <value></value> - <description> - Proxy group for templeton. - </description> -</property> - -<property> - <name>hadoop.proxyuser.scope.function_hdp_user("templeton_user").hosts</name> - <value></value> - <description> - Proxy host for templeton. - </description> -</property> ---> -</configuration>
