incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1418905 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/assets/data/wizard/deploy/ ambari-web/app/controllers/wizard/ ambari-web/app/models/ ambari-web/app/styles/ ambari-web/app/templates/wizard/ ambari-web/app/utils/ ambari...
Date Sun, 09 Dec 2012 12:09:35 GMT
Author: yusaku
Date: Sun Dec  9 12:09:34 2012
New Revision: 1418905

URL: http://svn.apache.org/viewvc?rev=1418905&view=rev
Log:
AMBARI-989. Show task logs for each host in the Deploy step of the wizard. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/task_log.json
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step8.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step8_view.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec  9 12:09:34 2012
@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-989. Show task logs for each host in the Deploy step of the
+  wizard. (yusaku)
+
   AMBARI-976.  Hook HDFS/MapReduce/HBase/Host graphs to backend API
   (Srimanth Gunturi via yusaku)
 

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/task_log.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/task_log.json?rev=1418905&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/task_log.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/deploy/task_log.json
Sun Dec  9 12:09:34 2012
@@ -0,0 +1,18 @@
+{
+  "href": "http://localhost:8080/api/clusters/mycluster/requests/1/tasks/1",
+  "Tasks": {
+    "exit_code": 0,
+    "stdout": "\u001B[0;36mnotice: /File[HDP]/ensure: defined content as '{md5}1b9bf482b0d9000dc118f861807e3768'\u001B[0m\n\u001B[0;36mnotice:
Finished catalog run in 0.05 seconds\u001B[0m\n\n\u001B[0;36mnotice: /File[HDP-UTILS]/ensure:
defined content as '{md5}33b4d1cfff9651814935531c07f95619'\u001B[0m\n\u001B[0;36mnotice: Finished
catalog run in 0.04 seconds\u001B[0m\n\n\u001B[0;33mwarning: Unrecognised escape sequence
'\\u' in file /tmp/ambari-agent/epel-1.pp at line 14\u001B[0m\n\u001B[0;33mwarning: Unrecognised
escape sequence '\\u' in file /tmp/ambari-agent/epel-1.pp at line 14\u001B[0m\n\u001B[0;33mwarning:
Unrecognised escape sequence '\\u' in file /tmp/ambari-agent/epel-1.pp at line 14\u001B[0m\n\u001B[0;36mnotice:
/File[epel]/content: content changed '{md5}4cd77946d1b5176987036e8fb382ce2d' to '{md5}01ce1b3ac52d274854b80bb793b779fa'\u001B[0m\n\u001B[0;36mnotice:
Finished catalog run in 0.16 seconds\u001B[0m\n\n\u001B[0;33mwarning: Dynamic lookup of $service_state
at
  /var/lib/ambari-agent/puppet/modules/hdp-hadoop/manifests/init.pp:130 is deprecated.  Support
will be removed in Puppet 2.8.  Use a fully-qualified variable name (e.g., $classname::variable)
or parameterized classes.\u001B[0m\n\u001B[0;33mwarning: Dynamic lookup of $service_state
at /var/lib/ambari-agent/puppet/modules/hdp-hadoop/manifests/service.pp:74 is deprecated.
 Support will be removed in Puppet 2.8.  Use a fully-qualified variable name (e.g., $classname::variable)
or parameterized classes.\u001B[0m\n\u001B[0;33mwarning: Dynamic lookup of $service_state
at /var/lib/ambari-agent/puppet/modules/hdp-hadoop/manifests/service.pp:83 is deprecated.
 Support will be removed in Puppet 2.8.  Use a fully-qualified variable name (e.g., $classname::variable)
or parameterized classes.\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Iptables/Service[iptables]/ensure:
ensure changed 'running' to 'stopped'\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Create_smoke_user/Hdp::User[ambari_q
 a]/User[ambari_qa]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Snappy::Package/Hdp::Package[snappy]/Hdp::Package::Yum[snappy]/Package[snappy]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp/Hdp::Package[glibc-rhel6]/Hdp::Package::Yum[glibc-rhel6]/Package[glibc.i686]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Create_smoke_user/Hdp::Exec[usermod -g
 users  ambari_qa]/Exec[usermod -g  users  ambari_qa]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp::Set_selinux/Hdp::Exec[/bin/echo 0 > /selinux/enforce]/Exec[/bin/echo 0 >
/selinux/enforce]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Snmp/Hdp::Package[snmp]/Hdp::Package::Yum[snmp]/Package[net-snmp-utils]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Snmp/Hdp::Package[snmp]/Hdp::Package::Yum[snmp]/Package[net-snmp]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Snmp/Hdp::Package[snmp]/Hdp::Package
 ::Yum[snmp]/Hdp::Java::Package[snmp]/Exec[mkdir -p /usr/jdk64 ; chmod +x /tmp/HDP-artifacts//jdk-6u31-linux-x64.bin;
cd /usr/jdk64 ; echo A | /tmp/HDP-artifacts//jdk-6u31-linux-x64.bin -noregister > /dev/null
2>&1 snmp]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice: /File[/usr/jdk64/jdk1.6.0_31/bin/java
snmp]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /File[/etc/snmp//snmpd.conf]/content:
content changed '{md5}8307434bc8ed4e2a7df4928fb4232778' to '{md5}f786955c0c36f7f5a4f375e3fe93c959'\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp::Snmp/Service[snmpd]/ensure: ensure changed 'stopped' to 'running'\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp::Snmp/Service[snmpd]: Triggered 'refresh' from 1 events\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp::Snappy::Package/Hdp::Package[snappy]/Hdp::Package::Yum[snappy]/Package[snappy-devel]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp::Snappy::Package/Hdp::Snappy::Package::Ln[64]/Hdp::Exec[hdp::snappy::package::ln
  64]/Exec[hdp::snappy::package::ln 64]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp::Snappy::Package/Hdp::Snappy::Package::Ln[32]/Hdp::Exec[hdp::snappy::package::ln
32]/Exec[hdp::snappy::package::ln 32]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/Stage[1]/Hdp/Group[hadoop]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /Stage[1]/Hdp/Hdp::User[hadoop_deploy]/User[hadoop_deploy]/ensure:
created\u001B[0m\n\u001B[0;36mnotice: /Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Datanode::Create_data_dirs[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory_recursive_create[/tmp/hadoop-hdfs/dfs/data]/Hdp::Exec[mkdir
-p /tmp/hadoop-hdfs/dfs/data]/Exec[mkdir -p /tmp/hadoop-hdfs/dfs/data]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/Stage[main]/Hdp-hadoop/Hdp::Directory_recursive_create[/var/log/hadoop]/Hdp::Exec[mkdir -p
/var/log/hadoop]/Exec[mkdir -p /var/log/hadoop]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/File[/var/
 log/hadoop]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice: /File[/var/log/hadoop]/seluser:
seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice: /Stage[main]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop
64]/Hdp::Package::Yum[hadoop 64]/Package[hadoop-sbin]/ensure: created\u001B[0m\n\u001B[0;36mnotice:
/Stage[main]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop 64]/Hdp::Package::Yum[hadoop
64]/Package[hadoop-libhdfs]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /Stage[main]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop
64]/Hdp::Package::Yum[hadoop 64]/Package[hadoop-pipes]/ensure: created\u001B[0m\n\u001B[0;36mnotice:
/Stage[main]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop 64]/Hdp::Package::Yum[hadoop
64]/Package[hadoop-native]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /File[/usr/jdk64/jdk1.6.0_31/bin/java
hadoop 64]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /Stage[main
 ]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop 64]/Hdp::Package::Yum[hadoop
64]/Package[hadoop-lzo]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /Stage[main]/Hdp-hadoop/Hdp-hadoop::Package[hadoop]/Hdp::Package[hadoop
64]/Hdp::Package::Yum[hadoop 64]/Package[hadoop-lzo-native]/ensure: created\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf]/owner: owner changed 'root' to 'hadoop_deploy'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf]/seluser: seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/core-site.xml]/content: content changed '{md5}5248c973f1cd3c22fefd056024434bcb'
to '{md5}683863be6291488bc08abbd97c7ff623'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/hadoop-env.sh]/content:
content changed '{md5}58885021e0700a18e824207296abb335' to '{md5}8a0bed492eb9ccb05bab8b86d36e1344'\u001B[0m\n\u001B[0;36mnoti
 ce: /File[/etc/hadoop/conf/hadoop-env.sh]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/hadoop-env.sh]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/log4j.properties]/content: content changed '{md5}98463b57c5de7290573af36f0738cd95'
to '{md5}f467666fc6a0c1ad80c6fd2048b2aa75'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/log4j.properties]/owner:
owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/log4j.properties]/group:
group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/taskcontroller.cfg]/content:
content changed '{md5}0e24dd628517df6d84383a5098d2f602' to '{md5}ad35ea77bb42bd3f92aa809be896d259'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/taskcontroller.cfg]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/taskcontroller.cfg]/group: group changed 'root' to 'hadoo
 p'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/hdfs-site.xml]/content: content changed
'{md5}5248c973f1cd3c22fefd056024434bcb' to '{md5}692150e423bb94f2f0f388983e75b1dc'\u001B[0m\n\u001B[0;36mnotice:
/Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Datanode::Create_data_dirs[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory_recursive_create[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory[/tmp/hadoop-hdfs/dfs/data]/File[/tmp/hadoop-hdfs/dfs/data]/owner:
owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice: /Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Datanode::Create_data_dirs[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory_recursive_create[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory[/tmp/hadoop-hdfs/dfs/data]/File[/tmp/hadoop-hdfs/dfs/data]/group:
group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice: /Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Datanode::Create_data_dirs[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory_recursive_create[/tmp/hadoop-hdfs/dfs/data]/Hdp::Directory[/tmp/hadoop
 -hdfs/dfs/data]/File[/tmp/hadoop-hdfs/dfs/data]/mode: mode changed '0755' to '0750'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/health_check]/ensure: created\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/hadoop-metrics2.properties]/content:
content changed '{md5}cdd8f9ac4e75353f997a7cfb44e0ee9a' to '{md5}ea74c62fc5454962c15de62bcf9bfa5f'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/hadoop-metrics2.properties]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/hadoop-metrics2.properties]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/commons-logging.properties]/ensure: created\u001B[0m\n\u001B[0;36mnotice:
/File[/etc/hadoop/conf/slaves]/content: content changed '{md5}b8419160170a41ae01abab13a3b887df'
to '{md5}d20f9cdc4f9769b0c61ace4e267fa4bb'\u001B[0m\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/slaves]/owner:
owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice
 : /File[/etc/hadoop/conf/slaves]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Service[datanode]/Hdp::Directory_recursive_create[/var/log/hadoop/hdfs]/Hdp::Exec[mkdir
-p /var/log/hadoop/hdfs]/Exec[mkdir -p /var/log/hadoop/hdfs]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/seluser: seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice:
/Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Service[datanode]/Hdp::Directory_recursive_create[/var/run/hadoop/hdfs]/Hdp::Exec[mkdir
-p /var/run/hadoop/hdfs]/Exec[mkdir -p /var/run/hadoop/hdfs]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/File[/var/run/hadoop/hdfs]/owner: owner changed 'root' to 'hdfs'\u001B[0m
 \n\u001B[0;36mnotice: /File[/var/run/hadoop/hdfs]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/run/hadoop/hdfs]/seluser: seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice:
Finished catalog run in 232.49 seconds\u001B[0m\n\n\u001B[0;36mnotice: /File[/etc/hadoop/conf/slaves]/group:
group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice: /Stage[2]/Hdp-hadoop::Datanode/Hdp-hadoop::Service[datanode]/Hdp::Directory_recursive_create[/var/log/hadoop/hdfs]/Hdp::Exec[mkdir
-p /var/log/hadoop/hdfs]/Exec[mkdir -p /var/log/hadoop/hdfs]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/log/hadoop/hdfs]/seluser: seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice:
/Stage[2]/Hdp-hadoop::Data
 node/Hdp-hadoop::Service[datanode]/Hdp::Directory_recursive_create[/var/run/hadoop/hdfs]/Hdp::Exec[mkdir
-p /var/run/hadoop/hdfs]/Exec[mkdir -p /var/run/hadoop/hdfs]/returns: executed successfully\u001B[0m\n\u001B[0;36mnotice:
/File[/var/run/hadoop/hdfs]/owner: owner changed 'root' to 'hdfs'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/run/hadoop/hdfs]/group: group changed 'root' to 'hadoop'\u001B[0m\n\u001B[0;36mnotice:
/File[/var/run/hadoop/hdfs]/seluser: seluser changed 'unconfined_u' to 'system_u'\u001B[0m\n\u001B[0;36mnotice:
Finished catalog run in 232.49 seconds\u001B[0m",
+    "status": "COMPLETED",
+    "stderr": "none\nnone\nnone\nnone",
+    "host_name": "myhost",
+    "id": 1,
+    "cluster_name": "mycluster",
+    "attempt_cnt": 1,
+    "request_id": 1,
+    "command": "INSTALL",
+    "role": "DATANODE",
+    "start_time": 1352331312891,
+    "stage_id": 1
+  }
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
Sun Dec  9 12:09:34 2012
@@ -68,6 +68,7 @@ App.WizardStep9Controller = Em.Controlle
     this.set('status', 'info');
     this.set('progress', '0');
     this.set('isStepCompleted', false);
+    this.numPolls = 0;
   },
 
   loadStep: function () {
@@ -109,55 +110,56 @@ App.WizardStep9Controller = Em.Controlle
   },
 
   displayMessage: function (task) {
+    var role = App.format.role(task.role);
     console.log("In display message with task command value: " + task.command);
     switch (task.command) {
       case 'INSTALL':
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to install ' + task.role;
+            return 'Preparing to install ' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for installation';
+            return role + ' is queued for installation';
           case 'IN_PROGRESS':
-            return 'Installing ' + task.role;
+            return 'Installing ' + role;
           case 'COMPLETED' :
-            return 'Successfully installed ' + task.role;
+            return 'Successfully installed ' + role;
           case 'FAILED':
-            return 'Failed to install ' + task.role;
+            return 'Failed to install ' + role;
         }
       case 'UNINSTALL':
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to uninstall ' + task.role;
+            return 'Preparing to uninstall ' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for uninstallation';
+            return role + ' is queued for uninstallation';
           case 'IN_PROGRESS':
-            return 'Uninstalling ' + task.role;
+            return 'Uninstalling ' + role;
           case 'COMPLETED' :
-            return 'Successfully uninstalled ' + task.role;
+            return 'Successfully uninstalled ' + role;
           case 'FAILED':
-            return 'Failed to uninstall ' + task.role;
+            return 'Failed to uninstall ' + role;
         }
       case 'START' :
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to start ' + task.role;
+            return 'Preparing to start ' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for starting';
+            return role + ' is queued for starting';
           case 'IN_PROGRESS':
-            return 'Starting ' + task.role;
+            return 'Starting ' + role;
           case 'COMPLETED' :
-            return task.role + ' started successfully';
+            return role + ' started successfully';
           case 'FAILED':
-            return task.role + ' failed to start';
+            return role + ' failed to start';
         }
       case 'STOP' :
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to stop ' + task.role;
+            return 'Preparing to stop ' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for stopping';
+            return role + ' is queued for stopping';
           case 'IN_PROGRESS':
-            return 'Stopping ' + task.role;
+            return 'Stopping ' + role;
           case 'COMPLETED' :
             return role + ' stopped successfully';
           case 'FAILED':
@@ -166,28 +168,28 @@ App.WizardStep9Controller = Em.Controlle
       case 'EXECUTE' :
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to execute' + task.role;
+            return 'Preparing to execute' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for execution';
+            return role + ' is queued for execution';
           case 'IN_PROGRESS':
-            return 'Execution of ' + task.role + ' in progress';
+            return 'Execution of ' + role + ' in progress';
           case 'COMPLETED' :
-            return task.role + ' executed successfully';
+            return role + ' executed successfully';
           case 'FAILED':
-            return task.role + ' failed to execute';
+            return role + ' failed to execute';
         }
       case 'ABORT' :
         switch (task.status) {
           case 'PENDING':
-            return 'Preparing to abort ' + task.role;
+            return 'Preparing to abort ' + role;
           case 'QUEUED' :
-            return task.role + ' is queued for aborting';
+            return role + ' is queued for aborting';
           case 'IN_PROGRESS':
-            return 'Aborting ' + task.role;
+            return 'Aborting ' + role;
           case 'COMPLETED' :
-            return task.role + ' aborted successfully';
+            return role + ' aborted successfully';
           case 'FAILED':
-            return task.role + ' failed to abort';
+            return role + ' failed to abort';
         }
     }
   },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/protoRelations.js Sun Dec 
9 12:09:34 2012
@@ -68,57 +68,7 @@ App.Service1Component = DS.Model.extend(
   host_name : DS.attr('string'),
 
   displayName: function() {
-    switch (this.get('componentName')) {
-      case 'NAMENODE':
-        return 'NameNode';
-      case 'SNAMENODE':
-        return 'SNameNode';
-      case 'DATANODE':
-        return 'DataNode';
-      case 'HDFS_CLIENT':
-        return 'HDFS Client';
-      case 'JOBTRACKER':
-        return 'JobTracker';
-      case 'TASKTRACKER':
-        return 'TaskTracker';
-      case 'MAPREDUCE_CLIENT':
-        return 'MapReduce Client';
-      case 'ZOOKEEPER_SERVER':
-        return 'ZooKeeper Server';
-      case 'ZOOKEEPER_CLIENT':
-        return 'ZooKeeper Client';
-      case 'HIVE_SERVER':
-        return 'Hive Server';
-      case 'HIVE_CLIENT':
-        return 'Hive Client';
-      case 'HIVE_MYSQL':
-        return 'Hive MySQL';
-      case 'HBASE_MASTER':
-        return 'HBase Master';
-      case 'HBASE_REGIONSERVER':
-        return 'RegionServer';
-      case 'HBASE_CLIENT':
-        return 'HBase Client';
-      case 'PIG_CLIENT':
-        return 'Pig Client';
-      case 'SQOOP_CLIENT':
-        return 'Sqoop Client';
-      case 'TEMPLETON_SERVER':
-        return 'Templeton Server';
-      case 'TEMPLETON_CLIENT':
-        return 'Templeton Client';
-      case 'OOZIE_SERVER':
-        return 'Oozie Server';
-      case 'OOZIE_CLIENT':
-        return 'Oozie Client';
-      case 'NAGIOS_SERVER':
-        return 'Nagios Server';
-      case 'GANGLIA_SERVER':
-        return 'Ganglia Collector';
-      case 'GANGLIA_MONITOR':
-        return 'Ganglia Monitor';
-    }
-    return this.get('componentName');
+    return App.format.role(this.get('componentName'));
   }.property('componentName'),
 
   isMaster: function() {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sun Dec  9
12:09:34 2012
@@ -52,6 +52,10 @@ footer {
   padding: 20px 0;
 }
 
+.modal-body {
+  max-height: 500px;
+}
+
 #top-nav {
   .navbar {
     font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -294,6 +298,17 @@ h1 {
   }
 }
 
+#host-log {
+  .stderr, .stdout {
+    background-color: #f0f0f0;
+    /* max-height: 300px;
+    overflow-y: auto; */
+    border-radius: 4px;
+    padding: 8px;
+  }
+}
+
+
 #serviceConfig {
   .accordion-heading {
     background-color: #f0f0f0;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step8.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step8.hbs?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step8.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step8.hbs Sun Dec
 9 12:09:34 2012
@@ -46,5 +46,5 @@
 </div>
 <div class="btn-area">
     <a class="btn pull-left" {{action back href="true"}}>&larr; Back</a>
-    <a class="btn btn-success pull-right" {{action submit target="controller"}}>Next
&rarr;</a>
+    <a class="btn btn-success pull-right" {{action submit target="controller"}}>Deploy
&rarr;</a>
 </div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
Sun Dec  9 12:09:34 2012
@@ -1,15 +1,17 @@
-<p>Click on the task to see the log: </p><br/>
-<ul>
-  {{#each item in view.roles}}
-  <li>{{item.roleName}}
-    <ul>
-      {{#each state in item.statusArr}}
-      <li>
-        <a {{bindAttr href="state.url"}}>{{state.status}}</a>
-      </li>
-      {{/each}}
-    </ul>
-  </li>
+<p>Click on the task to see the log:</p>
+<div id="host-log">
+  {{#each role in view.roles}}
+    {{#each taskInfo in role.taskInfos}}
+    <div>
+      <a {{action toggleTaskLog taskInfo}}>{{#if taskInfo.isLogHidden}}Show{{else}}Hide{{/if}}
{{role.roleName}} {{taskInfo.status}} log</a>
+      <div {{bindAttr class="taskInfo.isLogHidden:hidden"}}>
+        <h5>stderr:</h5>
+        <div class="stderr">{{taskInfo.stderr}}</div>
+        <h5>stdout:</h5>
+        <div class="stdout">{{taskInfo.stdout}}</div>
+      </div>
+    </div>
+    {{/each}}
   {{/each}}
-</ul>
+</div>
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js Sun Dec  9 12:09:34
2012
@@ -130,4 +130,109 @@ App.formatUrl = function (urlTemplate, s
     }
   }
   return formatted;
-}
\ No newline at end of file
+}
+
+App.format = {
+  role: function(role) {
+    switch (role) {
+      case 'ZOOKEEPER_SERVER':
+        return 'ZooKeeper Server';
+      case 'ZOOKEEPER_CLIENT':
+        return 'ZooKeeper Client';
+      case 'NAMENODE':
+        return 'NameNode';
+      case 'NAMENODE_SERVICE_CHECK':
+        return 'NameNode Service Check';
+      case 'DATANODE':
+        return 'DataNode';
+      case 'HDFS_SERVICE_CHECK':
+        return 'HDFS Service Check';
+      case 'SECONDARY_NAMENODE':
+        return 'SNameNode';
+      case 'HDFS_CLIENT':
+        return 'HDFS Client';
+      case 'HBASE_MASTER':
+        return 'HBase Master';
+      case 'HBASE_REGIONSERVER':
+        return 'HBase RegionServer';
+      case 'HBASE_CLIENT':
+        return 'HBase Client';
+      case 'JOBTRACKER':
+        return 'JobTracker';
+      case 'TASKTRACKER':
+        return 'TaskTracker';
+      case 'MAPREDUCE_CLIENT':
+        return 'MapReduce Client';
+      case 'JAVA_JCE':
+        return 'Java JCE';
+      case 'KERBEROS_SERVER':
+        return 'Kerberos Server';
+      case 'KERBEROS_CLIENT':
+        return 'Kerberos Client';
+      case 'KERBEROS_ADMIN_CLIENT':
+        return 'Kerberos Admin Client';
+      case 'HADOOP_CLIENT':
+        return 'Hadoop Client';
+      case 'JOBTRACKER_SERVICE_CHECK':
+        return 'JobTracker Service Check';
+      case 'MAPREDUCE_SERVICE_CHECK':
+        return 'MapReduce Service Check';
+      case 'ZOOKEEPER_SERVICE_CHECK':
+        return 'ZooKeeper Service Check';
+      case 'ZOOKEEPER_QUORUM_SERVICE_CHECK':
+        return 'ZooKeeper Quorum Service Check';
+      case  'HBASE_SERVICE_CHECK':
+        return 'HBase Service Check';
+      case 'MYSQL_SERVER':
+        return 'MySQL Server';
+      case 'HIVE_SERVER':
+        return 'Hive Server';
+      case 'HIVE_CLIENT':
+        return 'Hive Client';
+      case 'HIVE_SERVICE_CHECK':
+        return 'Hive Service Check';
+      case 'HCAT':
+        return 'HCat';
+      case 'HCAT_SERVICE_CHECK':
+        return 'HCat Service Check';
+      case 'OOZIE_CLIENT':
+        return 'Oozie Client';
+      case 'OOZIE_SERVER':
+        return 'Oozie Server';
+      case 'OOZIE_SERVICE_CHECK':
+        return 'Oozie Service Check';
+      case 'PIG':
+        return 'Pig';
+      case 'PIG_SERVICE_CHECK':
+        return 'Pig Service Check';
+      case 'SQOOP':
+        return 'Sqoop';
+      case 'SQOOP_SERVICE_CHECK':
+        return 'Sqoop Service Check';
+      case 'TEMPLETON_CLIENT':
+        return 'Templeton Client';
+      case 'TEMPLETON_SERVER':
+        return 'Templeton Server';
+      case 'TEMPLETON_SERVICE_CHECK':
+        return 'Templeton Service Check';
+      case 'DASHBOARD':
+        return 'Dashboard';
+      case 'DASHBOARD_SERVICE_CHECK':
+        return 'Dashboard Service Check';
+      case 'NAGIOS_SERVER':
+        return 'Nagios Server';
+      case 'GANGLIA_SERVER':
+        return 'Ganglia Server';
+      case 'GANGLIA_MONITOR':
+        return 'Ganglia Monitor';
+      case 'GMOND_SERVICE_CHECK':
+        return 'Gmond Service Check'
+      case 'GMETAD_SERVICE_CHECK':
+        return 'Gmetad Service Check';
+      case 'MONTOR_WEBSERVER':
+        return 'Monitor Webserver'
+      case 'DECOMMISSION_DATANODE':
+        return 'Decommission DataNode';
+    }
+  }
+};
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step8_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step8_view.js?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step8_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step8_view.js Sun Dec
 9 12:09:34 2012
@@ -26,5 +26,5 @@ App.WizardStep8View = Em.View.extend({
   didInsertElement: function () {
     var controller = this.get('controller');
     controller.loadStep();
-  }
+  },
 });

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js?rev=1418905&r1=1418904&r2=1418905&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js Sun Dec
 9 12:09:34 2012
@@ -128,24 +128,27 @@ App.HostStatusView = Em.View.extend({
           return this.get('parentView.obj');
         }.property('parentView.obj'),
 
-        logTasks: [],
+        logTasks: [],  // initialized in didInsertElement
+
+        task: null, // set in showTaskLog; contains task info including stdout and stderr
 
         roles: function () {
           var roleArr = [];
           var tasks = this.get('logTasks');
           if (tasks.length) {
-            var role = this.get('logTasks').mapProperty('Tasks.role').uniq();
-            role.forEach(function (_role) {
-              var statusArr = [];
+            var _roles = this.get('logTasks').mapProperty('Tasks.role').uniq();
+            _roles.forEach(function (_role) {
+              var taskInfos = [];
               var roleObj = {};
-              roleObj.roleName = _role;
+              roleObj.roleName = App.format.role(_role);
               tasks.filterProperty('Tasks.role', _role).forEach(function (_task) {
-                var statusObj = {};
-                statusObj.status = _task.Tasks.command;
-                statusObj.url = _task.href;
-                statusArr.pushObject(statusObj);
+                var taskInfo = Ember.Object.create();
+                taskInfo.set('status', _task.Tasks.command.toLowerCase());
+                taskInfo.set('url', _task.href);
+                taskInfo.set('isLogHidden', true);
+                taskInfos.pushObject(taskInfo);
               }, this);
-              roleObj.statusArr = statusArr;
+              roleObj.taskInfos = taskInfos;
               roleArr.pushObject(roleObj);
             }, this);
           }
@@ -154,10 +157,34 @@ App.HostStatusView = Em.View.extend({
 
         didInsertElement: function () {
           console.log('The value of event context is: ' + host.name);
-          this.set('logTasks', self.get('controller').getCompletedTasksForHost(event.context));
+          this.set('logTasks', self.get('controller').getCompletedTasksForHost(host));
+        },
+
+        toggleTaskLog: function (event, context) {
+          var taskInfo = event.context;
+          if (taskInfo.get('isLogHidden')) {
+            var url = (App.testMode) ? '/data/wizard/deploy/task_log.json' : taskInfo.url;
+            $.ajax({
+              url: url,
+              dataType: 'text',
+              timeout: 10000,
+              success: function(data) {
+                var task = $.parseJSON(data);
+                taskInfo.set('stdout', task.Tasks.stdout);
+                taskInfo.set('stderr', task.Tasks.stderr);
+                taskInfo.set('isLogHidden', false);
+              },
+              error: function() {
+                alert('Failed to retrieve task log');
+              }
+            });
+          } else {
+            taskInfo.set('isLogHidden', true);
+          }
         }
       })
     });
   }
+
 });
 



Mime
View raw message