incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject svn commit: r1460946 - in /incubator/ambari/trunk: ./ ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/ ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/ ambari-agent/src/main/puppet/modules/hdp-hue/manifests/ ambari-agent/src/main/pup...
Date Tue, 26 Mar 2013 01:35:03 GMT
Author: swagle
Date: Tue Mar 26 01:35:02 2013
New Revision: 1460946

URL: http://svn.apache.org/r1460946
Log:
AMBARI-1708. Remove all hardcoded ports from agent scripts to read from configs. (swagle)

Added:
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/health_check.erb
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_webui.sh
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/params.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/HBASE/configuration/hbase-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/MAPREDUCE/configuration/mapred-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/HBASE/configuration/hbase-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/MAPREDUCE/configuration/mapred-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.2/services/HBASE/configuration/hbase-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
    incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/MAPREDUCE/configuration/mapred-site.xml

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Mar 26 01:35:02 2013
@@ -12,6 +12,9 @@ Trunk (unreleased changes):
 
  NEW FEATURES
 
+ AMBARI-1708. Remove all hardcoded ports from agent scripts to read from 
+ configs. (swagle)
+
  AMBARI-1692. Make changes to agent scripts to support secure HBase and Zk. (swagle)
 
  AMBARI-1707. Upgrade should check if another upgrade request is active as well as 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/health_check.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/health_check.erb?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/health_check.erb
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/health_check.erb
Tue Mar 26 01:35:02 2013
@@ -53,7 +53,7 @@ function check_taskcontroller {
 
 function check_jetty {
   hname=`hostname`
-  jmx=`curl -s -S -m 5 "http://$hname:50060/jmx?qry=Hadoop:service=TaskTracker,name=ShuffleServerMetrics"
2>/dev/null` ;
+  jmx=`curl -s -S -m 5 "http://$hname:<%=scope.function_hdp_template_var("tasktracker_port")%>/jmx?qry=Hadoop:service=TaskTracker,name=ShuffleServerMetrics"
2>/dev/null` ;
   if [ $? -eq 0 ] ; then
     e=`echo $jmx | awk '/shuffle_exceptions_caught/ {printf"%d",$2}'` ;
     e=${e:-0} # no jmx servlet ?

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
Tue Mar 26 01:35:02 2013
@@ -87,8 +87,8 @@ class hdp-hbase::params() inherits hdp::
   $hbase_master_jaas_config_file = hdp_default("hadoop/hbase-site/hbase_master_jaas_config_file",
${conf_dir}/hbase_master_jaas.conf)
   $hbase_regionserver_jaas_config_file = hdp_default("hadoop/hbase-site/hbase_regionserver_jaas_config_file",
${conf_dir}/hbase_regionserver_jaas.conf)
 
-  $hbase_master_keytab_path = hdp_default("hadoop/hbase-site/hbase.master.keytab.file", "${keytab_path}/hbase.service.keytab")
-  $hbase_master_principal = hdp_default("hadoop/hbase-site/hbase.master.kerberos.principal",
"hbase/_HOST@${kerberos_domain}")
-  $hbase_regionserver_keytab_path = hdp_default("hadoop/hbase-site/hbase.regionserver.keytab.file",
"${keytab_path}/hbase.service.keytab")
-  $hbase_regionserver_principal = hdp_default("hadoop/hbase-site/hbase.regionserver.kerberos.principal",
"hbase/_HOST@${kerberos_domain}")
+  $hbase_master_keytab_path = hdp_default("hadoop/hbase-site/hbase_master_keytab_file", "${keytab_path}/hbase_service_keytab")
+  $hbase_master_principal = hdp_default("hadoop/hbase-site/hbase_master_kerberos_principal",
"hbase/_HOST@${kerberos_domain}")
+  $hbase_regionserver_keytab_path = hdp_default("hadoop/hbase-site/hbase_regionserver_keytab_file",
"${keytab_path}/hbase.service.keytab")
+  $hbase_regionserver_principal = hdp_default("hadoop/hbase-site/hbase_regionserver_kerberos_principal",
"hbase/_HOST@${kerberos_domain}")
 }

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hue/manifests/params.pp
Tue Mar 26 01:35:02 2013
@@ -132,7 +132,7 @@ class hdp-hue::params() inherits hdp::pa
     $hue_bash_nice_name = "Bash (Test only!!!)"
     $hue_bash_shell_command = "/bin/bash"
 
-    $hue_whitelist = "(localhost|127\\.0\\.0\\.1):(50030|50070|50060|50075|50111)"
+    $hue_whitelist = "(localhost|127\\.0\\.0\\.1):(${jtnode_port}|${namenode_port}|${tasktracker_port}|${datanode_port}|${jobhistory_port})"
   }
 
 }
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_webui.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_webui.sh?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_webui.sh
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_webui.sh
Tue Mar 26 01:35:02 2013
@@ -27,6 +27,7 @@ checkurl () {
 
 service=$1
 host=$2
+port=$3
 
 if [[ -z "$service" || -z "$host" ]]; then
   echo "UNKNOWN: Invalid arguments; Usage: check_webui.sh service_name host_name";
@@ -36,29 +37,28 @@ fi
 case "$service" in
 
 jobtracker) 
-    jtweburl="http://$host:50030"
+    jtweburl="http://$host:$port"
     if [[ `checkurl "$jtweburl"` -ne 0 ]]; then 
       echo "WARNING: Jobtracker web UI not accessible : $jtweburl";
       exit 1;
     fi
     ;;
 namenode)
-    nnweburl="http://$host:50070"
+    nnweburl="http://$host:$port"
     if [[ `checkurl "$nnweburl"` -ne 0 ]] ; then 
       echo "WARNING: NameNode web UI not accessible : $nnweburl";
       exit 1;
     fi
     ;;
 jobhistory)
-    jhweburl="http://$host:51111/jobhistoryhome.jsp"
+    jhweburl="http://$host:$port/jobhistoryhome.jsp"
     if [[ `checkurl "$jhweburl"` -ne 0 ]]; then 
       echo "WARNING: Jobhistory web UI not accessible : $jhweburl";
       exit 1;
     fi
     ;;
 hbase)
-    hbaseweburl="http://$host:60010/master-status"
-    jhweburl="http://domU-12-31-39-16-DC-FB.compute-1.internal:51111/jobhistoryhome.jsp"
+    hbaseweburl="http://$host:$port/master-status"
     if [[ `checkurl "$hbaseweburl"` -ne 0 ]]; then 
       echo "WARNING: HBase Master web UI not accessible : $hbaseweburl"; 
       exit 1;

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
Tue Mar 26 01:35:02 2013
@@ -61,7 +61,7 @@ define command{
 
 define command{
         command_name    check_webui
-        command_line    $USER1$/check_webui.sh $ARG1$ $HOSTADDRESS$
+        command_line    $USER1$/check_webui.sh $ARG1$ $HOSTADDRESS$ $PORT$
        }
 
 define command{

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
Tue Mar 26 01:35:02 2013
@@ -172,7 +172,7 @@ define service {
         use                     hadoop-service
         service_description     NAMENODE::Secondary NameNode process down
         servicegroups           HDFS
-        check_command           check_tcp!50090!-w 1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("snamenode_port")%>!-w
1 -c 1
         normal_check_interval   0.5
         retry_check_interval    0.25
         max_check_attempts      3
@@ -185,7 +185,7 @@ define service {
         use                     hadoop-service
         service_description     NAMENODE::NameNode Web UI down
         servicegroups           HDFS
-        check_command           check_webui!namenode
+        check_command           check_webui!namenode!<%=scope.function_hdp_template_var("namenode_port")%>
         normal_check_interval   1
         retry_check_interval    1
         max_check_attempts      3
@@ -196,7 +196,7 @@ define service {
         use                     hadoop-service
         service_description     NAMENODE::NameNode edit logs directory status
         servicegroups           HDFS
-        check_command           check_name_dir_status!50070
+        check_command           check_name_dir_status!<%=scope.function_hdp_template_var("namenode_port")%>
         normal_check_interval   0.5
         retry_check_interval    0.5
         max_check_attempts      3
@@ -230,7 +230,7 @@ define service {
         use                     hadoop-service
         service_description     HDFS::Corrupt/Missing blocks
         servicegroups           HDFS
-        check_command           check_hdfs_blocks!50070!0%!0%
+        check_command           check_hdfs_blocks!<%=scope.function_hdp_template_var("namenode_port")%>!0%!0%
         normal_check_interval   2
         retry_check_interval    1 
         max_check_attempts      1
@@ -241,7 +241,7 @@ define service {
         use                     hadoop-service
         service_description     HDFS::HDFS capacity utilization
         servicegroups           HDFS
-        check_command           check_hdfs_capacity!50070!80%!90%
+        check_command           check_hdfs_capacity!<%=scope.function_hdp_template_var("namenode_port")%>!80%!90%
         normal_check_interval   10
         retry_check_interval    1 
         max_check_attempts      1
@@ -252,7 +252,7 @@ define service {
         use                     hadoop-service
         service_description     HDFS::NameNode RPC latency
         servicegroups           HDFS
-        check_command           check_rpcq_latency!NameNode!50070!3000!5000
+        check_command           check_rpcq_latency!NameNode!<%=scope.function_hdp_template_var("namenode_port")%>!3000!5000
         normal_check_interval   5
         retry_check_interval    1 
         max_check_attempts      5
@@ -266,7 +266,7 @@ define service {
         use                     hadoop-service
         service_description     JOBTRACKER::JobTracker Web UI down
         servicegroups           MAPREDUCE
-        check_command           check_webui!jobtracker
+        check_command           check_webui!jobtracker!<%=scope.function_hdp_template_var("jtnode_port")%>
         normal_check_interval   1
         retry_check_interval    1
         max_check_attempts      3
@@ -277,7 +277,7 @@ define service {
         use                     hadoop-service
         service_description     JOBTRACKER::JobHistory Web UI down
         servicegroups           MAPREDUCE
-        check_command           check_webui!jobhistory
+        check_command           check_webui!jobhistory!<%=scope.function_hdp_template_var("jobhistory_port")%>
         normal_check_interval   1
         retry_check_interval    1
         max_check_attempts      3
@@ -298,9 +298,10 @@ define service {
 define service {
         hostgroup_name          jobtracker
         use                     hadoop-service
+        use                     hadoop-service
         service_description     JOBTRACKER::JobTracker process down
         servicegroups           MAPREDUCE
-        check_command           check_tcp!50030!-w 1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("jtnode_port")%>!-w
1 -c 1
         normal_check_interval   0.5
         retry_check_interval    0.25
         max_check_attempts      4
@@ -311,7 +312,7 @@ define service {
         use                     hadoop-service
         service_description     MAPREDUCE::JobTracker RPC latency
         servicegroups           MAPREDUCE
-        check_command           check_rpcq_latency!JobTracker!50030!3000!5000
+        check_command           check_rpcq_latency!JobTracker!<%=scope.function_hdp_template_var("jtnode_port")%>!3000!5000
         normal_check_interval   5
         retry_check_interval    1 
         max_check_attempts      5
@@ -323,7 +324,7 @@ define service {
         use                     hadoop-service
         service_description     TASKTRACKER::TaskTracker process down
         servicegroups           MAPREDUCE
-        check_command           check_tcp!50060!-w 1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("tasktracker_port")%>!-w
1 -c 1
         normal_check_interval   1
         retry_check_interval    0.5
         max_check_attempts      3
@@ -378,7 +379,7 @@ define service {
         use                     hadoop-service
         service_description     REGIONSERVER::RegionServer process down
         servicegroups           HBASE
-        check_command           check_tcp!60020!-w 1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("hbase_rs_port")%>!-w
1 -c 1
         normal_check_interval   1
         retry_check_interval    0.5
         max_check_attempts      3
@@ -390,7 +391,7 @@ define service {
         use                     hadoop-service
         service_description     HBASEMASTER::HBase Master Web UI down
         servicegroups           HBASE
-        check_command           check_webui!hbase
+        check_command           check_webui!hbase!<%=scope.function_hdp_template_var("hbase_master_port")%>
         normal_check_interval   1
         retry_check_interval    1
         max_check_attempts      3
@@ -412,7 +413,7 @@ define service {
         use                     hadoop-service
         service_description     HBASEMASTER::HBase Master process down
         servicegroups           HBASE
-        check_command           check_tcp!60000!-w 1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("hbase_master_port")%>!-w
1 -c 1
         normal_check_interval   0.5
         retry_check_interval    0.25
         max_check_attempts      4

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/params.pp?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/params.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-zookeeper/manifests/params.pp
Tue Mar 26 01:35:02 2013
@@ -35,8 +35,8 @@ class hdp-zookeeper::params() inherits h
   $syncLimit = hdp_default("syncLimit","5")
   $clientPort = hdp_default("clientPort","2181")
 
-  $zk_keytab_path = hdp_default("hadoop/zk-site/zk.service.keytab","${keytab_path}/zk.keytab.file")
-  $zk_principal = hdp_default("hadoop/zk-site/zk.kerberos.prinicipal", "zk/_HOST@${kerberos_domain}")
+  $zk_keytab_path = hdp_default("hadoop/zk-site/zk_service_keytab", "${keytab_path}/zk.keytab.file")
+  $zk_principal = hdp_default("hadoop/zk-site/zk_kerberos_prinicipal", "zk/_HOST@${kerberos_domain}")
 
   $zk_server_jaas_file = hdp_default("hadoop/zk-site/zk_server_jaas_conf_file", "${conf_dir}/zookeeper_jaas.conf")
   $zk_client_jaas_file = hdp_default("hadoop/zk-site/zk_client_jaas_conf_file", "${conf_dir}/zookeeper_client_jaas.conf")

Added: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb?rev=1460946&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
(added)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
Tue Mar 26 01:35:02 2013
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+#
+# to get Port from URL string
+module Puppet::Parser::Functions
+  newfunction(:hdp_get_port_from_url, :type => :rvalue) do |args|
+    args.empty? ? "" : args.kind_of?(Array) ? args[0].split(":")[1] : args.split(":")[1]
+  end
+end
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
Tue Mar 26 01:35:02 2013
@@ -32,7 +32,7 @@ define hdp::configfile(
   $slave_hosts = $hdp::params::slave_hosts,
   $hbase_rs_hosts = $hdp::params::hbase_rs_hosts,
   $zookeeper_hosts = $hdp::params::zookeeper_hosts,
-  $hbase_master_hosts = $hdp::params::hbase_master_hostss,
+  $hbase_master_hosts = $hdp::params::hbase_master_hosts,
   $hcat_server_host = $hdp::params::hcat_server_host,
   $hive_server_host = $hdp::params::hive_server_host,
   $oozie_server = $hdp::params::oozie_server,

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp Tue
Mar 26 01:35:02 2013
@@ -41,12 +41,44 @@ class hdp::params()
   $snamenode_host = hdp_default("snamenode_host")
   $jtnode_host = hdp_default("jtnode_host")
   $slave_hosts = hdp_default("slave_hosts")
-  
+
   $zookeeper_hosts = hdp_default("zookeeper_hosts")
 
   $hbase_master_hosts = hdp_default("hbase_master_hosts", "")
   $hbase_rs_hosts = hdp_default("hbase_rs_hosts",$slave_hosts) #if hbase_rs_hosts not given
it is assumed that region servers on same nodes as slaves
 
+  ## Port settings
+  if has_key($configuration, 'hdfs-site') {
+    $hdfs-site = $configuration['hdfs-site']
+    $namenode_port = hdp_get_port_from_url($hdfs-site["dfs.http.address"])
+    $snamenode_port = hdp_get_port_from_url($hdfs-site["dfs.secondary.http.address"])
+    $datanode_port = hdp_get_port_from_url($hdfs-site["dfs.datanode.http.address"])
+  } else {
+    $namenode_port = "50070"
+    $snamenode_port = "50090"
+    $datanode_port = "50075"
+  }
+
+  if has_key($configuration, 'mapred-site') {
+    $mapred-site = $configuration['mapred-site']
+    $jtnode_port = hdp_get_port_from_url($mapred-site["mapred.job.tracker.http.address"])
+    $tasktracker_port = hdp_get_port_from_url($mapred-site["mapred.task.tracker.http.address"])
+    $jobhistory_port = hdp_get_port_from_url($mapred-site["mapreduce.history.server.http.address"])
+  } else {
+    $jtnode_port = "50030"
+    $tasktracker_port = "50060"
+    $jobhistory_port = "51111"
+  }
+
+  if has_key($configuration, 'hbase-site') {
+    $hbase-site = $configuration['hbase-site']
+    $hbase_master_port = $hbase-site["hbase.master.info.port"]
+    $hbase_rs_port = $hbase-site["hbase.regionserver.info.port"]
+  } else {
+    $hbase_master_port = "60010"
+    $hbase_rs_port = "60030"
+  }
+
   $hive_server_host = hdp_default("hive_server_host", "")
   $oozie_server =  hdp_default("oozie_server", "")
   $webhcat_server_host = hdp_default("webhcat_server_host", "")

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/HBASE/configuration/hbase-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/HBASE/configuration/hbase-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/HBASE/configuration/hbase-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/HBASE/configuration/hbase-site.xml
Tue Mar 26 01:35:02 2013
@@ -90,6 +90,16 @@
     </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.master.lease.thread.wakefrequency</name>
     <value>3000</value>
     <description>The interval between checks for expired region server leases.

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/MAPREDUCE/configuration/mapred-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/MAPREDUCE/configuration/mapred-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/MAPREDUCE/configuration/mapred-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/0.1/services/MAPREDUCE/configuration/mapred-site.xml
Tue Mar 26 01:35:02 2013
@@ -1229,6 +1229,12 @@
   </description>
 </property>
 
+<property>
+  <name>mapred.task.tracker.http.address</name>
+  <value></value>
+  <description>Http address for task tracker.</description>
+</property>
+
 <!--  Node health script variables -->
 
 <property>

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/HBASE/configuration/hbase-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/HBASE/configuration/hbase-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/HBASE/configuration/hbase-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/HBASE/configuration/hbase-site.xml
Tue Mar 26 01:35:02 2013
@@ -58,6 +58,16 @@
     </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></value>
     <description>Maximum size of all memstores in a region server before new

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/MAPREDUCE/configuration/mapred-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/MAPREDUCE/configuration/mapred-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/MAPREDUCE/configuration/mapred-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.0/services/MAPREDUCE/configuration/mapred-site.xml
Tue Mar 26 01:35:02 2013
@@ -453,6 +453,12 @@
     <description>The filename of the keytab for the task tracker</description>
  </property>
 
+  <property>
+    <name>mapred.task.tracker.http.address</name>
+    <value></value>
+    <description>Http address for task tracker.</description>
+  </property>
+
  <property>
    <name>mapreduce.jobtracker.staging.root.dir</name>
    <value>/user</value>

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.2/services/HBASE/configuration/hbase-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.2/services/HBASE/configuration/hbase-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.2/services/HBASE/configuration/hbase-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.2.2/services/HBASE/configuration/hbase-site.xml
Tue Mar 26 01:35:02 2013
@@ -58,6 +58,16 @@
     </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></value>
     <description>Maximum size of all memstores in a region server before new

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/HBASE/configuration/hbase-site.xml
Tue Mar 26 01:35:02 2013
@@ -58,6 +58,16 @@
     </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></value>
     <description>Maximum size of all memstores in a region server before new

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/MAPREDUCE/configuration/mapred-site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/MAPREDUCE/configuration/mapred-site.xml?rev=1460946&r1=1460945&r2=1460946&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/MAPREDUCE/configuration/mapred-site.xml
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/stacks/HDP/1.3.0/services/MAPREDUCE/configuration/mapred-site.xml
Tue Mar 26 01:35:02 2013
@@ -454,6 +454,12 @@
  </property>
 
  <property>
+   <name>mapred.task.tracker.http.address</name>
+   <value></value>
+   <description>Http address for task tracker.</description>
+ </property>
+
+ <property>
    <name>mapreduce.jobtracker.staging.root.dir</name>
    <value>/user</value>
  <description>The Path prefix for where the staging directories should be placed. The
next level is always the user's



Mime
View raw message