You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/05/30 23:47:11 UTC

svn commit: r1488027 - in /incubator/ambari/branches/branch-1.4.0: ./ ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/ ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/ ambari-agent/src/main/puppet/modules/hdp-templeton/manifest...

Author: yusaku
Date: Thu May 30 21:47:10 2013
New Revision: 1488027

URL: http://svn.apache.org/r1488027
Log:

AMBARI-2214. Hadoop2 Monitoring: YARN does not have a service page. (srimanth via yusaku)
AMBARI-2237. Hadoop 2: Add user configs for MR2/YARN. (yusaku)
AMBARI-2236. Hadoop 2: set appropriate non-default values. (yusaku)
AMBARI-2238. Hadoop 2: Cannot stop/start YARN and MR2 services. (yusaku)
AMBARI-2216. Hadoop2: Empty stack configuration values become 'null' on the node. (srimanth via yusaku)

Added:
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/mapreduce2.js
Removed:
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/service/info/summary/yarn.hbs
Modified:
    incubator/ambari/branches/branch-1.4.0/CHANGES.txt
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
    incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
    incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
    incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
    incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/global.xml
    incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/YARN/configuration/global.xml
    incubator/ambari/branches/branch-1.4.0/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/config.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/global/cluster_controller.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/admin/misc_controller.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/wizard/step7_controller.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_mapping.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_properties.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/config_properties.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/messages.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/models.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/host_component.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/yarn.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/admin/misc.hbs
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/dashboard/service/yarn.hbs
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/host/summary.hbs
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/config.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/common/quick_view_link_view.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hbase.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hdfs.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/mapreduce.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/oozie.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/host/summary.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/service/info/summary.js

Modified: incubator/ambari/branches/branch-1.4.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/CHANGES.txt?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/CHANGES.txt (original)
+++ incubator/ambari/branches/branch-1.4.0/CHANGES.txt Thu May 30 21:47:10 2013
@@ -6,6 +6,29 @@ should be listed by their full name.
  - Please keep the file to a max of 80 characters wide.
  - Put latest commits first in each section.
 
+Branch 1.4.0:
+
+ INCOMPATIBLE CHANGES
+
+ NEW FEATURES
+
+ AMBARI-2214. Hadoop2 Monitoring: YARN does not have a service page.
+ (srimanth via yusaku)
+
+ IMPROVEMENTS
+
+ AMBARI-2237. Hadoop 2: Add user configs for MR2/YARN. (yusaku)
+
+ AMBARI-2236. Hadoop 2: set appropriate non-default values. (yusaku)
+
+ BUG FIXES
+
+ AMBARI-2238. Hadoop 2: Cannot stop/start YARN and MR2 services. (yusaku)
+
+ AMBARI-2216. Hadoop2: Empty stack configuration values become 'null' on the
+ node. (srimanth via yusaku)
+
+
 Trunk (unreleased changes):
 
  INCOMPATIBLE CHANGES 

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp Thu May 30 21:47:10 2013
@@ -33,9 +33,9 @@ define hdp-hadoop::hdfs::directory(
   $try_sleep = 10
  
   if ($service_state == 'running') {
-  
-  
-    if $stack_version in ("2.0.1") {
+
+
+    if (hdp_get_major_stack_version($stack_version) >= 2) {
       $mkdir_cmd = "fs -mkdir -p ${name}"
     } else {
       $mkdir_cmd = "fs -mkdir ${name}"

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp Thu May 30 21:47:10 2013
@@ -190,7 +190,7 @@ debug('##Configs generation for hdp-hado
     group => $hdp::params::user_group
   }
 
-  if $stack_version in ("2.0.1") {
+  if (hdp_get_major_stack_version($stack_version) >= 2) {
     if (hdp_is_empty($configuration) == false and hdp_is_empty($configuration['hdfs-site']) == false) {
       if (hdp_is_empty($configuration['hdfs-site']['dfs.hosts.exclude']) == false) {
         $exlude_file_path = $configuration['hdfs-site']['dfs.hosts.exclude']
@@ -302,7 +302,7 @@ class hdp-hadoop(
     }
 
 
-    if $stack_version in ("2.0.1") {
+    if (hdp_get_major_stack_version($stack_version) >= 2) {
       hdp::directory_recursive_create { "$hadoop_tmp_dir":
         service_state => $service_state,
         force => true,
@@ -310,7 +310,7 @@ class hdp-hadoop(
       }
     }
 
-    if $stack_version in ("2.0.1") {
+    if (hdp_get_major_stack_version($stack_version) >= 2) {
       Anchor['hdp-hadoop::begin'] -> Hdp-hadoop::Package<||> ->  Hdp::User<|title == $hdfs_user or title == $mapred_user|>  ->
       Hdp::Directory_recursive_create[$hadoop_config_dir] -> Hdp-hadoop::Configfile<|tag == 'common'|> ->
       Hdp::Directory_recursive_create[$logdirprefix] -> Hdp::Directory_recursive_create[$piddirprefix] -> Hdp::Directory_recursive_create["$hadoop_tmp_dir"] -> Anchor['hdp-hadoop::end']

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp Thu May 30 21:47:10 2013
@@ -166,7 +166,7 @@ define hdp-hadoop::namenode::create_app_
       }
     }
 
-    if $stack_version in ("2.0.1") {
+    if (hdp_get_major_stack_version($stack_version) >= 2) {
       if ($hdp::params::nm_hosts != "") {
         if ($hdp::params::yarn_log_aggregation_enabled == "true") {
           $yarn_user = $hdp::params::yarn_user

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp Thu May 30 21:47:10 2013
@@ -81,7 +81,7 @@ class hdp-hadoop::params(
   
   $mapred_log_dir_prefix = hdp_default("mapred_log_dir_prefix","/var/log/hadoop-mapreduce")
 
-  $mapred_pid_dir_prefix = hdp_default("mapreduce_libs_path","/var/run/hadoop-mapreduce")
+  $mapred_pid_dir_prefix = hdp_default("mapred_pid_dir_prefix","/var/run/hadoop-mapreduce")
 
   ### compression related
   if (($hdp::params::lzo_enabled == true) and ($hdp::params::snappy_enabled == true)) {

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp Thu May 30 21:47:10 2013
@@ -93,7 +93,7 @@ class hdp-templeton::copy-hdfs-directori
 #    mode  => '755',
 #    dest_dir => '/apps/templeton/ugi.jar'
 #  }
-  if $stack_version in ("2.0.1") {
+  if (hdp_get_major_stack_version($stack_version) >= 2) {
     hdp-hadoop::hdfs::copyfromlocal { '/usr/lib/hadoop-mapreduce/hadoop-streaming*.jar':
       service_state => $service_state,
       owner => $webhcat_user,

Added: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb?rev=1488027&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb (added)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb Thu May 30 21:47:10 2013
@@ -0,0 +1,28 @@
+#
+#
+# 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 handle differences in how args passed in
+module Puppet::Parser::Functions
+  newfunction(:hdp_get_major_stack_version, :type => :rvalue) do |args|
+    stack_version = args[0]
+    major_stack_version = stack_version.split('.')[0]
+    major_stack_version.to_i
+  end
+end
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp Thu May 30 21:47:10 2013
@@ -300,7 +300,7 @@ class hdp::params()
    
     $mapred_smoke_test_script = "/usr/lib/hadoop/sbin/hadoop-validate-setup.sh"
 
-    if $stack_version in ("2.0.1") {
+    if (hdp_get_major_stack_version($stack_version) >= 2) {
       $hadoop_bin = "/usr/lib/hadoop/sbin"
     } else {
       $hadoop_bin = "/usr/lib/hadoop/bin"

Modified: incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java Thu May 30 21:47:10 2013
@@ -55,6 +55,7 @@ public class ActionMetadata {
     serviceActions.put("hdfs"       , Arrays.asList(Role.HDFS_SERVICE_CHECK.toString()));
     serviceActions.put("hbase"      , Arrays.asList(Role.HBASE_SERVICE_CHECK.toString()));
     serviceActions.put("mapreduce"  , Arrays.asList(Role.MAPREDUCE_SERVICE_CHECK.toString()));
+    serviceActions.put("mapreduce2" , Arrays.asList(Role.MAPREDUCE2_SERVICE_CHECK.toString()));
     serviceActions.put("zookeeper"  , Arrays.asList(Role.ZOOKEEPER_QUORUM_SERVICE_CHECK.toString()));
     serviceActions.put("hive"       , Arrays.asList(Role.HIVE_SERVICE_CHECK.toString()));
     serviceActions.put("hcat"       , Arrays.asList(Role.HCAT_SERVICE_CHECK.toString()));
@@ -69,6 +70,8 @@ public class ActionMetadata {
     serviceCheckActions.put("hbase", Role.HBASE_SERVICE_CHECK.toString());
     serviceCheckActions.put("mapreduce",
         Role.MAPREDUCE_SERVICE_CHECK.toString());
+    serviceCheckActions.put("mapreduce2",
+        Role.MAPREDUCE2_SERVICE_CHECK.toString());
     serviceCheckActions.put("zookeeper",
         Role.ZOOKEEPER_QUORUM_SERVICE_CHECK.toString());
     serviceCheckActions.put("hive", Role.HIVE_SERVICE_CHECK.toString());

Modified: incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java Thu May 30 21:47:10 2013
@@ -161,6 +161,12 @@ public class RoleCommandOrder {
         Role.JOBTRACKER, RoleCommand.START);
     addDependency(Role.MAPREDUCE_SERVICE_CHECK, RoleCommand.EXECUTE,
         Role.TASKTRACKER, RoleCommand.START);
+    addDependency(Role.MAPREDUCE2_SERVICE_CHECK, RoleCommand.EXECUTE,
+        Role.NODEMANAGER, RoleCommand.START);
+    addDependency(Role.MAPREDUCE2_SERVICE_CHECK, RoleCommand.EXECUTE,
+        Role.RESOURCEMANAGER, RoleCommand.START);
+    addDependency(Role.MAPREDUCE2_SERVICE_CHECK, RoleCommand.EXECUTE,
+        Role.HISTORYSERVER, RoleCommand.START);
     addDependency(Role.RESOURCEMANAGER_SERVICE_CHECK, RoleCommand.EXECUTE,
         Role.RESOURCEMANAGER, RoleCommand.START);
     addDependency(Role.OOZIE_SERVICE_CHECK, RoleCommand.EXECUTE,

Modified: incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/global.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/global.xml?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/global.xml (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/global.xml Thu May 30 21:47:10 2013
@@ -26,4 +26,19 @@
     <value></value>
     <description>History Server.</description>
   </property>
+  <property>
+    <name>mapred_log_dir_prefix</name>
+    <value>/var/log/hadoop-mapreduce</value>
+    <description>Mapreduce Log Dir Prefix</description>
+  </property>
+  <property>
+    <name>mapred_pid_dir_prefix</name>
+    <value>/var/run/hadoop-mapreduce</value>
+    <description>Mapreduce PID Dir Prefix</description>
+  </property>
+  <property>
+    <name>mapred_user</name>
+    <value>mapred</value>
+    <description>Mapreduce User</description>
+  </property>
 </configuration>

Modified: incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/YARN/configuration/global.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/YARN/configuration/global.xml?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/YARN/configuration/global.xml (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-server/src/main/resources/stacks/HDP/2.0.1/services/YARN/configuration/global.xml Thu May 30 21:47:10 2013
@@ -31,4 +31,19 @@
     <value></value>
     <description>List of Node Manager Hosts.</description>
   </property>
+  <property>
+    <name>yarn_log_dir_prefix</name>
+    <value>/var/log/hadoop-yarn</value>
+    <description>YARN Log Dir Prefix</description>
+  </property>
+  <property>
+    <name>yarn_pid_dir_prefix</name>
+    <value>/var/run/hadoop-yarn</value>
+    <description>YARN PID Dir Prefix</description>
+  </property>
+  <property>
+    <name>yarn_user</name>
+    <value>yarn</value>
+    <description>YARN User</description>
+  </property>
 </configuration>

Modified: incubator/ambari/branches/branch-1.4.0/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java Thu May 30 21:47:10 2013
@@ -71,5 +71,15 @@ public class RoleGraphTest {
     RoleGraphNode hdfs_service_check = new RoleGraphNode(Role.HDFS_SERVICE_CHECK, RoleCommand.EXECUTE);
     RoleGraphNode snamenode_start = new RoleGraphNode(Role.SECONDARY_NAMENODE, RoleCommand.START);
     Assert.assertEquals(-1, rco.order(snamenode_start, hdfs_service_check));
+    
+    RoleGraphNode mapred2_service_check = new RoleGraphNode(Role.MAPREDUCE2_SERVICE_CHECK, RoleCommand.EXECUTE);
+    RoleGraphNode rm_start = new RoleGraphNode(Role.RESOURCEMANAGER, RoleCommand.START);
+    RoleGraphNode nm_start = new RoleGraphNode(Role.NODEMANAGER, RoleCommand.START);
+    RoleGraphNode hs_start = new RoleGraphNode(Role.HISTORYSERVER, RoleCommand.START);
+    Assert.assertEquals(-1, rco.order(rm_start, mapred2_service_check));
+    Assert.assertEquals(-1, rco.order(nm_start, mapred2_service_check)); 
+    Assert.assertEquals(-1, rco.order(hs_start, mapred2_service_check)); 
+    Assert.assertEquals(-1, rco.order(hs_start, mapred2_service_check)); 
+    
   }
 }

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/config.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/config.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/config.js Thu May 30 21:47:10 2013
@@ -34,6 +34,8 @@ App.componentsUpdateInterval = 6000;
 App.contentUpdateInterval = 15000;
 App.maxRunsForAppBrowser = 500;
 App.pageReloadTime=3600000;
+App.singleNodeInstall = false;
+App.singleNodeAlias = document.location.hostname;
 
 // experimental features are automatically enabled if running on brunch server
 App.enableExperimental = false;

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/global/cluster_controller.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/global/cluster_controller.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/global/cluster_controller.js Thu May 30 21:47:10 2013
@@ -120,7 +120,7 @@ App.ClusterController = Em.Controller.ex
               if (host) {
                 hostName = host.get('publicHostName');
               }
-              return "http://" + hostName + "/ganglia";
+              return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : hostName) + "/ganglia";
             }
           }
         }
@@ -154,7 +154,7 @@ App.ClusterController = Em.Controller.ex
               if (host) {
                 hostName = host.get('publicHostName');
               }
-              return "http://" + hostName + "/nagios";
+              return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : hostName) + "/nagios";
             }
           }
         }

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/admin/misc_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/admin/misc_controller.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/admin/misc_controller.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/main/admin/misc_controller.js Thu May 30 21:47:10 2013
@@ -42,6 +42,7 @@ App.MainAdminMiscController = App.MainSe
     });
   },
   loadServiceTagSuccess: function(data, opt, params) {
+    var installedServices = App.Service.find().mapProperty("serviceName");
     var serviceConfigsDef = params.serviceConfigsDef;
     var serviceName = this.get('content.serviceName');
     var loadedClusterSiteToTagMap = {};
@@ -57,6 +58,8 @@ App.MainAdminMiscController = App.MainSe
 
     var misc_configs = configSet.globalConfigs.filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true);
 
+    misc_configs = App.config.miscConfigVisibleProperty(misc_configs, installedServices);
+
     var sortOrder = this.get('configs').filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true).mapProperty('name');
 
     var sorted = [];

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/wizard/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/wizard/step7_controller.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/wizard/step7_controller.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/controllers/wizard/step7_controller.js Thu May 30 21:47:10 2013
@@ -91,20 +91,7 @@ App.WizardStep7Controller = Em.Controlle
    */
   activateSpecialConfigs: function () {
     var miscConfigs = this.get('stepConfigs').findProperty('serviceName', 'MISC').configs;
-    var showProxyGroup = this.get('selectedServiceNames').contains('HIVE') ||
-      this.get('selectedServiceNames').contains('HCATALOG') ||
-      this.get('selectedServiceNames').contains('OOZIE');
-    miscConfigs.findProperty('name', 'proxyuser_group').set('isVisible', showProxyGroup);
-    miscConfigs.findProperty('name', 'hbase_user').set('isVisible', this.get('selectedServiceNames').contains('HBASE'));
-    miscConfigs.findProperty('name', 'mapred_user').set('isVisible', this.get('selectedServiceNames').contains('MAPREDUCE'));
-    miscConfigs.findProperty('name', 'hive_user').set('isVisible', this.get('selectedServiceNames').contains('HIVE'));
-    miscConfigs.findProperty('name', 'hcat_user').set('isVisible', this.get('selectedServiceNames').contains('HCATALOG'));
-    miscConfigs.findProperty('name', 'webhcat_user').set('isVisible', this.get('selectedServiceNames').contains('WEBHCAT'));
-    miscConfigs.findProperty('name', 'oozie_user').set('isVisible', this.get('selectedServiceNames').contains('OOZIE'));
-    miscConfigs.findProperty('name', 'zk_user').set('isVisible', this.get('selectedServiceNames').contains('ZOOKEEPER'));
-    miscConfigs.findProperty('name', 'gmetad_user').set('isVisible', this.get('selectedServiceNames').contains('GANGLIA'));
-    miscConfigs.findProperty('name', 'rrdcached_base_dir').set('isVisible', this.get('selectedServiceNames').contains('GANGLIA'));
-    miscConfigs.findProperty('name', 'nagios_user').set('isVisible', this.get('selectedServiceNames').contains('NAGIOS'));
+    miscConfigs = App.config.miscConfigVisibleProperty(miscConfigs, this.get('selectedServiceNames'));
   },
 
   /**

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_mapping.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_mapping.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_mapping.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_mapping.js Thu May 30 21:47:10 2013
@@ -275,7 +275,7 @@ var configs = [
     "name": "oozie.base.url",
     "templateName": ["oozieserver_host"],
     "foreignKey": null,
-    "value": "http://<templateName[0]>:11000/oozie",
+    "value": "http://<templateName[0]>:11000",
     "filename": "oozie-site.xml"
   },
   /**********************************************hive-site***************************************/
@@ -330,6 +330,13 @@ var configs = [
     "value": "hdfs://<templateName[0]>:8041",
     "filename": "yarn-site.xml"
   },
+  {
+    "name": "yarn.log.server.url",
+    "templateName": ["hs_host"],
+    "foreignKey": null,
+    "value": "http://<templateName[0]>:19888/jobhistory/logs",
+    "filename": "yarn-site.xml"
+  },
 /**********************************************mapred-site***************************************/
   {
     "name": "mapreduce.jobhistory.webapp.address",

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_properties.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_properties.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/HDP2/config_properties.js Thu May 30 21:47:10 2013
@@ -1898,7 +1898,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1913,7 +1914,8 @@ module.exports =
       "filename": "core-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HIVE","WEBHCAT","OOZIE"]
     },
     {
       "id": "puppet var",
@@ -1927,7 +1929,8 @@ module.exports =
       "filename": "hdfs-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1941,7 +1944,8 @@ module.exports =
       "filename": "hdfs-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1954,7 +1958,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1967,7 +1972,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1980,7 +1986,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -1993,7 +2000,8 @@ module.exports =
       "displayType": "directory",
       "isVisible": false,
       "domain": "global",
-      "serviceName": "MISC"
+      "serviceName": "MISC",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2007,7 +2015,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2021,7 +2030,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2035,7 +2045,8 @@ module.exports =
       "isVisible": true,
       "serviceName": "MISC",
       "domain": "global",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     {
       "id": "puppet var",
@@ -2049,7 +2060,23 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["MAPREDUCE2"]
+    },
+    {
+      "id": "puppet var",
+      "name": "yarn_user",
+      "displayName": "YARN User",
+      "description": "User to run YARN as",
+      "defaultValue": "yarn",
+      "isReconfigurable": false,
+      "displayType": "user",
+      "isOverridable": false,
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "MISC",
+      "category": "Users and Groups",
+      "belongsToService":["YARN"]
     },
     {
       "id": "puppet var",
@@ -2063,7 +2090,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HBASE"]
     },
     {
       "id": "puppet var",
@@ -2077,7 +2105,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HIVE"]
     },
     {
       "id": "puppet var",
@@ -2091,7 +2120,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HCATALOG"]
     },
     {
       "id": "puppet var",
@@ -2105,7 +2135,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["WEBHCAT"]
     },
     {
       "id": "puppet var",
@@ -2119,7 +2150,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["OOZIE"]
     },
     {
       "id": "puppet var",
@@ -2133,7 +2165,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["ZOOKEEPER"]
     },
     {
       "id": "puppet var",
@@ -2147,7 +2180,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["GANGLIA"]
     },
     {
       "id": "puppet var",
@@ -2161,7 +2195,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName":"MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2175,7 +2210,8 @@ module.exports =
       "domain": "global",
       "isVisible": true,
       "serviceName":"MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["NAGIOS"]
     },
     {
       "id": "puppet var",
@@ -2189,7 +2225,8 @@ module.exports =
       "isVisible": App.supports.customizeSmokeTestUser,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     {
       "id": "puppet var",
@@ -2203,7 +2240,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     {
       "id": "puppet var",
@@ -2215,7 +2253,8 @@ module.exports =
       "isOverridable": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":["GANGLIA"]
     }
   ]
 };

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/config_properties.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/data/config_properties.js Thu May 30 21:47:10 2013
@@ -2132,7 +2132,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2147,7 +2148,8 @@ module.exports =
       "filename": "core-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HIVE","WEBHCAT","OOZIE"]
     },
     {
       "id": "puppet var",
@@ -2161,7 +2163,8 @@ module.exports =
       "filename": "hdfs-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2175,7 +2178,8 @@ module.exports =
       "filename": "hdfs-site.xml",
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2188,7 +2192,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2201,7 +2206,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2214,7 +2220,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":[]
     },
     /*
     {
@@ -2269,7 +2276,8 @@ module.exports =
       "displayType": "directory",
       "isVisible": false,
       "domain": "global",
-      "serviceName": "MISC"
+      "serviceName": "MISC",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2283,7 +2291,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2297,7 +2306,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Advanced"
+      "category": "Advanced",
+      "belongsToService":[]
     },
     /*
     {
@@ -2413,7 +2423,8 @@ module.exports =
       "isVisible": true,
       "serviceName": "MISC",
       "domain": "global",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     {
       "id": "puppet var",
@@ -2427,7 +2438,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["MAPREDUCE"]
     },
     {
       "id": "puppet var",
@@ -2441,7 +2453,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HBASE"]
     },
     {
       "id": "puppet var",
@@ -2455,7 +2468,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HIVE"]
     },
     {
       "id": "puppet var",
@@ -2469,7 +2483,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HCATALOG"]
     },
     {
       "id": "puppet var",
@@ -2483,7 +2498,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["WEBHCAT"]
     },
     {
       "id": "puppet var",
@@ -2497,7 +2513,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["OOZIE"]
     },
     /*
     {
@@ -2568,7 +2585,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["ZOOKEEPER"]
     },
     {
       "id": "puppet var",
@@ -2582,7 +2600,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["GANGLIA"]
     },
     {
       "id": "puppet var",
@@ -2596,7 +2615,8 @@ module.exports =
       "isVisible": false,
       "domain": "global",
       "serviceName":"MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":[]
     },
     {
       "id": "puppet var",
@@ -2610,7 +2630,8 @@ module.exports =
       "domain": "global",
       "isVisible": true,
       "serviceName":"MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["NAGIOS"]
     },
     {
       "id": "puppet var",
@@ -2624,7 +2645,8 @@ module.exports =
       "isVisible": App.supports.customizeSmokeTestUser,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     {
       "id": "puppet var",
@@ -2638,7 +2660,8 @@ module.exports =
       "isVisible": true,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "Users and Groups"
+      "category": "Users and Groups",
+      "belongsToService":["HDFS"]
     },
     /*
     {
@@ -2664,7 +2687,8 @@ module.exports =
       "isOverridable": false,
       "domain": "global",
       "serviceName": "MISC",
-      "category": "General"
+      "category": "General",
+      "belongsToService":["GANGLIA"]
     }
   ]
 };

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js Thu May 30 21:47:10 2013
@@ -79,10 +79,16 @@ App.servicesMapper = App.QuickDataMapper
     safe_mode_status: 'nameNodeComponent.ServiceComponentInfo.Safemode'
   },
   yarnConfig: {
+    version: 'resourceManagerComponent.ServiceComponentInfo.Version',
     resource_manager_node_id: 'resourceManagerComponent.host_components[0].HostRoles.host_name',
     node_manager_nodes: 'node_manager_nodes',
     yarn_client_nodes: 'yarn_client_nodes'
   },
+  mapReduce2Config: {
+    version: 'jobHistoryServerComponent.ServiceComponentInfo.Version',
+    job_history_server_id: 'jobHistoryServerComponent.host_components[0].HostRoles.host_name',
+    map_reduce2_clients: 'map_reduce2_clients',
+  },
   mapReduceConfig: {
     version: 'jobTrackerComponent.ServiceComponentInfo.Version',
     job_tracker_id: 'jobTrackerComponent.host_components[0].HostRoles.host_name',
@@ -179,6 +185,11 @@ App.servicesMapper = App.QuickDataMapper
               finalJson.rand = Math.random();
               result.push(finalJson);
               App.store.load(App.HBaseService, finalJson);
+            } else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "MAPREDUCE2") {
+              finalJson = this.mapreduce2Mapper(item);
+              finalJson.rand = Math.random();
+              result.push(finalJson);
+              App.store.load(App.MapReduce2Service, finalJson);
             }
             else {
               finalJson = this.parseIt(item, this.config);
@@ -323,6 +334,33 @@ App.servicesMapper = App.QuickDataMapper
 
     return finalJson;
   },
+  mapreduce2Mapper: function (item) {
+    var result = [];
+    var finalConfig = jQuery.extend({}, this.config);
+    // Change the JSON so that it is easy to map
+    var mapReduce2Config = this.mapReduce2Config;
+    item.components.forEach(function (component) {
+      if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "HISTORYSERVER") {
+        item.jobHistoryServerComponent = component;
+        finalConfig = jQuery.extend(finalConfig, mapReduce2Config);
+      }
+      if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "MAPREDUCE2_CLIENT") {
+        if (!item.map_reduce2_clients) {
+          item.map_reduce2_clients = [];
+        }
+        if (component.host_components) {
+          component.host_components.forEach(function (hc) {
+            item.map_reduce2_clients.push(hc.HostRoles.host_name);
+          });
+        }
+      }
+    });
+    // Map
+    var finalJson = this.parseIt(item, finalConfig);
+    finalJson.quick_links = [1, 2, 3, 4];
+
+    return finalJson;
+  },
   mapreduceMapper: function (item) {
     // Change the JSON so that it is easy to map
     var result = [];

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/messages.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/messages.js Thu May 30 21:47:10 2013
@@ -795,6 +795,8 @@ Em.I18n.translations = {
   'services.ganglia.webUi': 'Ganglia Web UI',
   'services.ganglia.monitors': 'Ganglia Monitors',
 
+  'services.mapreduce2.webUi': 'History Server UI',
+
   'services.zookeeper.prefix': '{0} of',
   'services.zookeeper.title': '{0} ZooKeepers',
   'services.zookeeper.postfix': 'running',
@@ -991,6 +993,16 @@ Em.I18n.translations = {
   'dashboard.services.yarn.nodeManagers':'NodeManagers',
   'dashboard.services.yarn.yarnClients':'YARN Clients',
   'dashboard.services.yarn.resourceManagerWebUI':'ResourceManager Web UI',
+  'dashboard.services.yarn.resourceManager.uptime':'ResourceManager Uptime',
+  'dashboard.services.resourceManager.nodes.heap':'ResourceManager Heap',
+  'dashboard.services.yarn.nodeManagers.live': 'NodeManagers Alive',
+  'dashboard.services.yarn.nodeManagers.live.msg':'{0} live / {1} total',
+  'dashboard.services.yarn.nodeManagers.status': 'NodeManagers Status',
+  'dashboard.services.yarn.nodeManagers.status.msg': '{0} active / {1} lost / {2} unhealthy / {3} rebooted / {4} decommissioned',
+  'dashboard.services.yarn.containers': 'Containers',
+  'dashboard.services.yarn.containers.msg': '{0} allocated / {1} pending / {2} reserved',
+  'dashboard.services.yarn.apps': 'Applications',
+  'dashboard.services.yarn.apps.msg': '{0} submitted / {1} running / {2} pending / {3} completed / {4} killed / {5} failed',
 
   'dashboard.services.mapreduce.summary':'{0} of {1} trackers live, {2} jobs running, {3} jobs waiting',
   'dashboard.services.mapreduce.taskTrackers':'TaskTrackers',

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/models.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/models.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/models.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/models.js Thu May 30 21:47:10 2013
@@ -31,6 +31,7 @@ require('models/service_audit');
 require('models/service/hdfs');
 require('models/service/yarn');
 require('models/service/mapreduce');
+require('models/service/mapreduce2');
 require('models/service/hbase');
 require('models/alert');
 require('models/user');

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/host_component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/host_component.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/host_component.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/host_component.js Thu May 30 21:47:10 2013
@@ -55,6 +55,7 @@ App.HostComponent = DS.Model.extend({
       case 'WEBHCAT_SERVER':
       case 'HUE_SERVER':
       case 'HISTORYSERVER':
+      case 'RESOURCEMANAGER':
         return true;
       default:
         return false;
@@ -66,6 +67,7 @@ App.HostComponent = DS.Model.extend({
       case 'TASKTRACKER':
       case 'HBASE_REGIONSERVER':
       case 'GANGLIA_MONITOR':
+      case 'NODEMANAGER':
         return true;
       default:
         return false;
@@ -94,13 +96,7 @@ App.HostComponent = DS.Model.extend({
    */
   componentTextStatus: function () {
     var value = this.get("workStatus");
-    if(this.get('isDecommissioning')){
-      if(value == "STARTED"){
-        value = "DECOMMISSIONING";
-      }else if(value == "INSTALLED"){
-        value = "DECOMMISSIONED";
-      }
-    }
+
     switch(value){
       case "INSTALLING":
         return 'Installing...';
@@ -114,17 +110,13 @@ App.HostComponent = DS.Model.extend({
         return 'Starting...';
       case "STOPPING":
         return 'Stopping...';
-      case "DECOMMISSIONING":
-        return 'Decommissioning...';
-      case "DECOMMISSIONED":
-        return 'Decommissioned';
       case "UNKNOWN":
         return 'Heartbeat lost...';
       case "UPGRADE_FAILED":
         return 'Upgrade Failed';
     }
     return 'Unknown';
-  }.property('workStatus')
+  }.property('workStatus','isDecommissioning')
 });
 
 App.HostComponent.FIXTURES = [];

Added: incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/mapreduce2.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/mapreduce2.js?rev=1488027&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/mapreduce2.js (added)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/mapreduce2.js Thu May 30 21:47:10 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.
+ */
+
+var App = require('app');
+
+App.MapReduce2Service = App.Service.extend({
+  version: DS.attr('string'),
+  jobHistoryServer: DS.belongsTo('App.Host'),
+  mapReduce2Clients: DS.hasMany('App.Host'),
+});
+
+App.MapReduce2Service.FIXTURES = [];

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/yarn.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/yarn.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/yarn.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/models/service/yarn.js Thu May 30 21:47:10 2013
@@ -21,7 +21,23 @@ App.YARNService = App.Service.extend({
   version: DS.attr('string'),
   resourceManagerNode: DS.belongsTo('App.Host'),
   nodeManagerNodes: DS.hasMany('App.Host'),
+  nodeManagerLiveNodes: DS.hasMany('App.Host'),
+  nodeManagersCountActive: DS.attr('number'),
+  nodeManagersCountLost: DS.attr('number'),
+  nodeManagersCountUnhealthy: DS.attr('number'),
+  nodeManagersCountRebooted: DS.attr('number'),
+  nodeManagersCountDecommissioned: DS.attr('number'),
+  containersAllocated: DS.attr('number'),
+  containersPending: DS.attr('number'),
+  containersReserved: DS.attr('number'),
+  appsSubmitted: DS.attr('number'),
+  appsRunning: DS.attr('number'),
+  appsPending: DS.attr('number'),
+  appsCompleted: DS.attr('number'),
+  appsKilled: DS.attr('number'),
+  appsFailed: DS.attr('number'),
   yarnClientNodes: DS.hasMany('App.Host'),
+  resourceManagerStartTime: DS.attr('number'),
   jvmMemoryHeapUsed: DS.attr('number'),
   jvmMemoryHeapCommitted: DS.attr('number'),
 });

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates.js Thu May 30 21:47:10 2013
@@ -24,6 +24,5 @@ require('templates/main/service/info/sum
 require('templates/main/service/info/summary/oozie');
 require('templates/main/service/info/summary/zookeeper');
 require('templates/main/service/info/summary/mapreduce2');
-require('templates/main/service/info/summary/yarn');
 require('templates/main/service/info/summary/hive');
 require('templates/main/service/info/summary/hue');

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/admin/misc.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/admin/misc.hbs?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/admin/misc.hbs (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/admin/misc.hbs Thu May 30 21:47:10 2013
@@ -31,10 +31,12 @@
           </thead>
           <tbody>
             {{#each user in controller.users}}
-              <tr>
-                <td>{{user.displayName}}</td>
-                <td>{{user.value}}</td>
-              </tr>
+              {{#if user.isVisible}}
+                <tr>
+                  <td>{{user.displayName}}</td>
+                  <td>{{user.value}}</td>
+                </tr>
+              {{/if}}
             {{/each}}
           </tbody>
         </table>

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/dashboard/service/yarn.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/dashboard/service/yarn.hbs?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/dashboard/service/yarn.hbs (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/dashboard/service/yarn.hbs Thu May 30 21:47:10 2013
@@ -67,6 +67,36 @@
         <td><a {{bindAttr href="view.nodeWebUrl"}} target="_blank">{{view.service.resourceManagerNode.publicHostName}}:8088</a>
         </td>
       </tr>
+      <!-- Resource Manager Uptime -->
+      <tr>
+        <td>{{t dashboard.services.yarn.resourceManager.uptime}}</td>
+        <td>{{view.nodeUptime}}</td>
+      </tr>
+      <!-- Resource Manager Heap -->
+      <tr>
+        <td>{{t dashboard.services.resourceManager.nodes.heap}}</td>
+        <td>{{view.nodeHeap}}</td>
+      </tr>
+      <!-- NodeManagers live -->
+      <tr>
+        <td>{{t dashboard.services.yarn.nodeManagers.live}}</td>
+        <td>{{view.nodeManagersLive}}</td>
+      </tr>
+      <!-- NodeManagers status -->
+      <tr>
+        <td>{{t dashboard.services.yarn.nodeManagers.status}}</td>
+        <td>{{view.nodeManagersStatus}}</td>
+      </tr>
+      <!-- Containers -->
+      <tr>
+        <td>{{t dashboard.services.yarn.containers}}</td>
+        <td>{{view.containers}}</td>
+      </tr>
+      <!-- Applications -->
+      <tr>
+        <td>{{t dashboard.services.yarn.apps}}</td>
+        <td>{{view.apps}}</td>
+      </tr>
     {{#unless view.showOnlyRows}}
       </tbody>
     </table>

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/host/summary.hbs?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/templates/main/host/summary.hbs Thu May 30 21:47:10 2013
@@ -75,37 +75,49 @@
                       </div>
                     </li>
                   {{#if view.isDataNode}}
-                  <li {{bindAttr class="view.isDataNodeDecommissionAvailable::hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "decommission" view.content target="controller"}}>
-                      {{t common.decommission}}
-                    </a>
-                  </li>
-                  <li {{bindAttr class="view.isDataNodeRecommissionAvailable::hidden view.noActionAvailable:hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "recommission" view.content target="controller"}}>
-                      {{t common.recommission}}
-                    </a>
-                  </li>
+                    {{#if view.isDataNodeDecommissionAvailable}}
+                      <li {{bindAttr class="view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "decommission" view.content target="controller"}}>
+                          {{t common.decommission}}
+                        </a>
+                      </li>
+                    {{/if}}
+                    {{#if view.isDataNodeRecommissionAvailable}}
+                      <li {{bindAttr class="view.noActionAvailable"}}>
+                        <a href="javascript:void(null)" data-toggle="modal" {{action "recommission" view.content target="controller"}}>
+                          {{t common.recommission}}
+                        </a>
+                      </li>
+                    {{/if}}
+                  {{/if}}
+                  {{#if view.isStart}}
+                    <li {{bindAttr class=" view.isDecommissioning:hidden view.noActionAvailable"}}>
+                      <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
+                        {{t common.stop}}
+                      </a>
+                    </li>
+                  {{/if}}
+                  {{#unless view.isStart}}
+                    <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
+                      <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
+                        {{t common.start}}
+                      </a>
+                    </li>
+                  {{/unless}}
+                  {{#if view.isUpgradeFailed}}
+                    <li {{bindAttr class="view.noActionAvailable"}}>
+                      <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
+                        {{t common.reUpgrade}}
+                      </a>
+                    </li>
+                  {{/if}}
+                  {{#if view.isInstallFailed}}
+                    <li {{bindAttr class="view.noActionAvailable"}}>
+                      <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
+                        {{t common.reinstall}}
+                      </a>
+                    </li>
                   {{/if}}
-                  <li {{bindAttr class="view.isStart::hidden view.isDecommissioning:hidden view.noActionAvailable:hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
-                      {{t common.stop}}
-                    </a>
-                  </li>
-                  <li {{bindAttr class="view.isStart:hidden view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable:hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
-                      {{t common.start}}
-                    </a>
-                  </li>
-                  <li {{bindAttr class="view.isUpgradeFailed::hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
-                      {{t common.reUpgrade}}
-                    </a>
-                  </li>
-                  <li {{bindAttr class="view.isInstallFailed::hidden"}}>
-                    <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
-                      {{t common.reinstall}}
-                    </a>
-                  </li>
                 </ul>
               </div>
               {{/if}}

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/config.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/config.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/config.js Thu May 30 21:47:10 2013
@@ -154,15 +154,16 @@ App.config = Em.Object.create({
       properties = (properties.length) ? properties.objectAt(0).properties : {};
       for (var index in properties) {
         var configsPropertyDef = preDefinedConfigs.findProperty('name', index) || null;
-        var serviceConfigObj = {
+        var serviceConfigObj = App.ServiceConfig.create({
           name: index,
           value: properties[index],
           defaultValue: properties[index],
           filename: _tag.siteName + ".xml",
           isUserProperty: false,
           isOverridable: true,
-          serviceName: serviceName
-        };
+          serviceName: serviceName,
+          belongsToService: []
+        });
 
         if (configsPropertyDef) {
           serviceConfigObj.displayType = configsPropertyDef.displayType;
@@ -174,6 +175,7 @@ App.config = Em.Object.create({
           serviceConfigObj.isOverridable = configsPropertyDef.isOverridable === undefined ? true : configsPropertyDef.isOverridable;
           serviceConfigObj.serviceName = configsPropertyDef ? configsPropertyDef.serviceName : null;
           serviceConfigObj.index = configsPropertyDef.index;
+          serviceConfigObj.belongsToService = configsPropertyDef.belongsToService;
         }
         // MAPREDUCE contains core-site properties but doesn't show them
         if(serviceConfigObj.serviceName === 'MAPREDUCE' && serviceConfigObj.filename === 'core-site.xml'){
@@ -367,6 +369,14 @@ App.config = Em.Object.create({
         break;
     }
   },
+
+  miscConfigVisibleProperty: function (configs, serviceToShow) {
+    configs.forEach(function(item) {
+      item.set("isVisible", item.belongsToService.some(function(cur){return serviceToShow.contains(cur)}));
+    });
+    return configs;
+  },
+
   /**
    * render configs, distribute them by service
    * and wrap each in ServiceConfigProperty object

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/common/quick_view_link_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/common/quick_view_link_view.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/common/quick_view_link_view.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/common/quick_view_link_view.js Thu May 30 21:47:10 2013
@@ -29,13 +29,18 @@ App.QuickViewLinks = Em.View.extend({
     var host;
 
     if (serviceName === 'HDFS') {
-      host = components.findProperty('componentName', 'NAMENODE').get('host.publicHostName');
+      host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName', 'NAMENODE').get('host.publicHostName');
     } else if (serviceName === 'MAPREDUCE') {
-      host = components.findProperty('componentName', 'JOBTRACKER').get('host.publicHostName');
+      host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName', 'JOBTRACKER').get('host.publicHostName');
     } else if (serviceName === 'HBASE') {
       var component = components.filterProperty('componentName', 'HBASE_MASTER').findProperty('haStatus', 'active');
       if(component){
-        host = component.get('host.publicHostName');
+        if(App.singleNodeInstall){
+          host = App.singleNodeAlias;
+        }else{
+          host = component.get('host.publicHostName');
+        }
+
       }
     }
     if (!host) {

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hbase.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hbase.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hbase.js Thu May 30 21:47:10 2013
@@ -80,7 +80,7 @@ App.MainDashboardServiceHbaseView = App.
 
   hbaseMasterWebUrl: function () {
     if (this.get('activeMaster.host') && this.get('activeMaster.host').get('publicHostName')) {
-      return "http://" + this.get('activeMaster.host').get('publicHostName') + ":60010";
+      return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('activeMaster.host').get('publicHostName')) + ":60010";
     }
   }.property('activeMaster'),
 

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hdfs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hdfs.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hdfs.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/hdfs.js Thu May 30 21:47:10 2013
@@ -70,7 +70,7 @@ App.MainDashboardServiceHdfsView = App.M
   }.property("service.nameNodeStartTime"),
 
   nodeWebUrl: function () {
-    return "http://" + this.get('service').get('nameNode').get('publicHostName') + ":50070";
+    return "http://" + (App.singleNodeInstall ? App.singleNodeAlias :  this.get('service').get('nameNode').get('publicHostName')) + ":50070";
   }.property('service.nameNode'),
 
   nodeHeap: function () {

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/mapreduce.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/mapreduce.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/mapreduce.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/mapreduce.js Thu May 30 21:47:10 2013
@@ -22,7 +22,7 @@ App.MainDashboardServiceMapreduceView = 
   templateName: require('templates/main/dashboard/service/mapreduce'),
   serviceName: 'MAPREDUCE',
   jobTrackerWebUrl: function () {
-    return "http://" + this.get('service').get('jobTracker').get('publicHostName') + ":50030";
+    return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('service').get('jobTracker').get('publicHostName')) + ":50030";
   }.property('service.nameNode'),
 
   Chart: App.ChartLinearView.extend({

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/oozie.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/oozie.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/oozie.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/oozie.js Thu May 30 21:47:10 2013
@@ -23,7 +23,7 @@ App.MainDashboardServiceOozieView = App.
   templateName: require('templates/main/dashboard/service/oozie'),
 
   webUi: function () {
-    var hostName = this.get('service.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.publicHostName');
+    var hostName = App.singleNodeInstall ? App.singleNodeAlias : this.get('service.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.publicHostName');
     return "http://{0}:11000/oozie".format(hostName);
   }.property('service')
 });
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js Thu May 30 21:47:10 2013
@@ -48,4 +48,58 @@ App.MainDashboardServiceYARNView = App.M
   yarnClientComponent: function () {
     return App.HostComponent.find().findProperty('componentName', 'YARN_CLIENT');
   }.property(),
+  
+  nodeUptime: function () {
+    var uptime = this.get('service').get('resourceManagerStartTime');
+    if (uptime && uptime > 0){
+      var diff = (new Date()).getTime() - uptime;
+      if (diff < 0) {
+        diff = 0;
+      }
+      var formatted = date.timingFormat(diff);
+      return this.t('dashboard.services.uptime').format(formatted);
+    }
+    return this.t('services.service.summary.notRunning');
+  }.property("service.resourceManagerStartTime"),
+
+  nodeHeap: function () {
+    var memUsed = this.get('service').get('jvmMemoryHeapUsed') * 1000000;
+    var memCommitted = this.get('service').get('jvmMemoryHeapCommitted') * 1000000;
+    var percent = memCommitted > 0 ? ((100 * memUsed) / memCommitted) : 0;
+    return this.t('dashboard.services.hdfs.nodes.heapUsed').format(memUsed.bytesToSize(1, 'parseFloat'), memCommitted.bytesToSize(1, 'parseFloat'), percent.toFixed(1));
+  }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapCommitted'),
+
+  nodeManagersLive: function () {
+    var nodeManagers = this.get('service.nodeManagerNodes.length');
+    var nodeManagersLive = this.get('service.nodeManagerLiveNodes.length');
+    return this.t('dashboard.services.yarn.nodeManagers.live.msg').format(nodeManagersLive, nodeManagers);
+  }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapCommitted'),
+
+  nodeManagersStatus: function () {
+    var nmActive = this.get('service.nodeManagersCountActive');
+    var nmLost = this.get('service.nodeManagersCountLost');
+    var nmUnhealthy = this.get('service.nodeManagersCountUnhealthy');
+    var nmRebooted = this.get('service.nodeManagersCountRebooted');
+    var nmDecom = this.get('service.nodeManagersCountDecommissioned');
+    return this.t('dashboard.services.yarn.nodeManagers.status.msg').format(nmActive, nmLost, nmUnhealthy, nmRebooted, nmDecom);
+  }.property('service.nodeManagersCountActive', 'service.nodeManagersCountLost', 
+      'service.nodeManagersCountUnhealthy', 'service.nodeManagersCountRebooted', 'service.nodeManagersCountDecommissioned'),
+
+  containers: function () {
+    var allocated = this.get('service.containersAllocated');
+    var pending = this.get('service.containersPending');
+    var reserved = this.get('service.containersReserved');
+    return this.t('dashboard.services.yarn.containers.msg').format(allocated, pending, reserved);
+  }.property('service.containersAllocated', 'service.containersPending', 'service.containersReserved'),
+
+  apps: function () {
+    var appsSubmitted = this.get('service.appsSubmitted');
+    var appsRunning = this.get('service.appsRunning');
+    var appsPending = this.get('service.appsPending');
+    var appsCompleted = this.get('service.appsCompleted');
+    var appsKilled = this.get('service.appsKilled');
+    var appsFailed = this.get('service.appsFailed');
+    return this.t('dashboard.services.yarn.apps.msg').format(appsSubmitted, appsRunning, appsPending, appsCompleted, appsKilled, appsFailed);
+  }.property('service.appsSubmitted', 'service.appsRunning', 'service.appsPending', 'service.appsCompleted', 'service.appsKilled', 'service.appsFailed'),
+
 });
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/host/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/host/summary.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/host/summary.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/host/summary.js Thu May 30 21:47:10 2013
@@ -195,13 +195,22 @@ App.MainHostSummaryView = Em.View.extend
      * Return host component text status
      */
     componentTextStatus: function () {
+      var workStatus = this.get("workStatus");
       var componentTextStatus = this.get('content.componentTextStatus');
       var hostComponent = this.get('hostComponent');
       if (hostComponent) {
         componentTextStatus = hostComponent.get('componentTextStatus');
+        if(this.get("isDataNode"))
+          if(this.get('isDataNodeRecommissionAvailable')){
+            if(App.HostComponentStatus.started == workStatus){
+              componentTextStatus = "Decommissioning...";
+            }else if(App.HostComponentStatus.stopped == workStatus){
+              componentTextStatus = "Decommissioned";
+            }
+          }
       }
       return componentTextStatus;
-    }.property('workStatus'),
+    }.property('workStatus','isDataNodeRecommissionAvailable'),
 
     statusClass: function () {
       var statusClass = null;
@@ -230,25 +239,15 @@ App.MainHostSummaryView = Em.View.extend
      * For Upgrade failed state
      */
     isUpgradeFailed: function () {
-      return App.HostComponentStatus.getKeyName(this.get('workStatus')) === "upgrade_failed" && !this.get("noActionAvailable");
+      return App.HostComponentStatus.getKeyName(this.get('workStatus')) === "upgrade_failed";
     }.property("workStatus"),
     /**
      * For Install failed state
      */
     isInstallFailed: function () {
-      return App.HostComponentStatus.getKeyName(this.get('workStatus')) === "install_failed" && !this.get("noActionAvailable");
+      return App.HostComponentStatus.getKeyName(this.get('workStatus')) === "install_failed";
     }.property("workStatus"),
     /**
-     * No action available while component is starting/stopping/unknown
-     */
-    noActionAvailable: function () {
-      var workStatus = this.get('workStatus');
-      if ([App.HostComponentStatus.starting, App.HostComponentStatus.stopping, App.HostComponentStatus.unknown].contains(workStatus)) {
-        return true;
-      }
-      return false;
-    }.property('workStatus'),
-    /**
      * Do blinking for 1 minute
      */
     doBlinking: function () {
@@ -276,15 +275,27 @@ App.MainHostSummaryView = Em.View.extend
       this.$('.components-health').stop(true, true);
       this.$('.components-health').css({opacity: 1.0});
       this.doBlinking();
-    }.observes('workStatus'),
+    }.observes('workStatus','isDataNodeRecommissionAvailable'),
 
     isStart: function () {
-      return (this.get('workStatus') === App.HostComponentStatus.started || this.get('workStatus') === App.HostComponentStatus.starting);
+      return (this.get('workStatus') == App.HostComponentStatus.started || this.get('workStatus') == App.HostComponentStatus.starting);
+    }.property('workStatus'),
+
+    /**
+     * No action available while component is starting/stopping/unknown
+     */
+    noActionAvailable: function () {
+      var workStatus = this.get('workStatus');
+      if ([App.HostComponentStatus.starting, App.HostComponentStatus.stopping, App.HostComponentStatus.unknown].contains(workStatus)) {
+        return "hidden";
+      }else{
+        return "";
+      }
     }.property('workStatus'),
 
     isInProgress: function () {
       return (this.get('workStatus') === App.HostComponentStatus.stopping || this.get('workStatus') === App.HostComponentStatus.starting) || this.get('isDataNodeRecommissionAvailable');
-    }.property('workStatus'),
+    }.property('workStatus', 'isDataNodeRecommissionAvailable'),
     /**
      * Shows whether we need to show Decommision/Recomission buttons
      */
@@ -293,8 +304,8 @@ App.MainHostSummaryView = Em.View.extend
     }.property('content'),
 
     isDecommissioning: function () {
-      return this.get('isDataNode') && (this.get('content.isDecommissioning') || this.get("isDataNodeRecommissionAvailable"));
-    }.property("workStatus", "content.isDecommissioning"),
+      return this.get('isDataNode') &&  this.get("isDataNodeRecommissionAvailable");
+    }.property("workStatus", "isDataNodeRecommissionAvailable"),
 
     /**
      * Set in template via binding from parent view
@@ -304,7 +315,7 @@ App.MainHostSummaryView = Em.View.extend
      * Decommission is available whenever the service is started.
      */
     isDataNodeDecommissionAvailable: function () {
-      return this.get('isStart') && !this.get('isDataNodeRecommissionAvailable') && !this.get("noActionAvailable");
+      return this.get('isStart') && !this.get('isDataNodeRecommissionAvailable');
     }.property('isStart', 'isDataNodeRecommissionAvailable'),
 
     /**

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/service/info/summary.js?rev=1488027&r1=1488026&r2=1488027&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/service/info/summary.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/service/info/summary.js Thu May 30 21:47:10 2013
@@ -175,7 +175,7 @@ App.MainServiceInfoSummaryView = Em.View
   getServer: function(serviceName) {
     var service=this.get('controller.content');
     if(service.get("id") == serviceName) {
-      return service.get("hostComponents").findProperty('isMaster', true).get("host").get("publicHostName");
+      return (App.singleNodeInstall ? App.singleNodeAlias : service.get("hostComponents").findProperty('isMaster', true).get("host").get("publicHostName"));
     }
     else {
       return '';