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/08/19 21:15:37 UTC
git commit: AMBARI-2956. NameNode HA: Show HA info in Services > HDFS
> Summary. (Aleksandr Kovalenko via yusaku)
Updated Branches:
refs/heads/trunk fb20eab51 -> a62956823
AMBARI-2956. NameNode HA: Show HA info in Services > HDFS > Summary. (Aleksandr Kovalenko via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/a6295682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a6295682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a6295682
Branch: refs/heads/trunk
Commit: a6295682347bbc84c556f60f77b0937a36b268f2
Parents: fb20eab
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Aug 19 12:15:06 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Aug 19 12:15:06 2013 -0700
----------------------------------------------------------------------
ambari-web/app/messages.js | 2 ++
.../templates/main/dashboard/service/hdfs.hbs | 14 +++++++++
.../app/views/main/dashboard/service/hdfs.js | 32 +++++++++++++++++++-
3 files changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index ebf9d08..fba4ab3 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -803,6 +803,7 @@ Em.I18n.translations = {
'services.service.summary.viewHost':'View Host',
'services.service.summary.viewHosts':'View Hosts',
'services.service.summary.DataNodesLive':'DataNodes Live',
+ 'services.service.summary.JournalNodesLive':'JournalNodes Live',
'services.service.summary.mapreduce2.client':'MapReduce2 Client',
'services.service.summary.mapreduce2.clients':'MapReduce2 Clients',
'services.service.summary.nodeManagersLive':'NodeManagers Live',
@@ -1244,6 +1245,7 @@ Em.I18n.translations = {
'dashboard.services.hdfs.summary':'{0} of {1} nodes live, {2}% capacity used',
'dashboard.services.hdfs.nanmenode':'NameNode',
'dashboard.services.hdfs.snanmenode':'Secondary NameNode',
+ 'dashboard.services.hdfs.journalnodes':'JournalNodes',
'dashboard.services.hdfs.capacity':'HDFS Disk Capacity',
'dashboard.services.hdfs.capacityUsed':'{0} / {1} ({2}% used)',
'dashboard.services.hdfs.totalFilesAndDirs':'Total Files + Directories',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
index 645729f..8e68727 100644
--- a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
+++ b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
@@ -57,6 +57,20 @@
</div>
</td>
</tr>
+ <!-- Journal Nodes -->
+ <tr>
+ <td>{{t dashboard.services.hdfs.journalnodes}}</td>
+ <td>
+ <span>
+ {{#view view.journalNodesLiveTextView}}
+ {{view.liveComponents}}/{{view.totalComponents}}
+ {{/view}}
+ </span> {{t services.service.summary.JournalNodesLive}}
+ <div class="summary-view-host">
+ <a href="#" {{action filterHosts view.journalNodeComponent}}>{{view.journalNodeHostText}}</a>
+ </div>
+ </td>
+ </tr>
<!-- NameNode Uptime -->
<tr>
<td>{{t dashboard.services.hdfs.nodes.uptime}}</td>
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6295682/ambari-web/app/views/main/dashboard/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js
index c914932..89c04d3 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -37,6 +37,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
}.property('service.capacityUsed', 'service.capacityTotal')
}),
+ dashboardMasterComponentView: Em.View.extend({
+ templateName: require('templates/main/service/info/summary/master_components'),
+ mastersComp : function() {
+ return this.get('parentView.service.hostComponents').filter(function(comp){
+ return comp.get('isMaster') && comp.get('componentName') !== 'JOURNALNODE';
+ });
+ }.property("service")
+ }),
+
dataNodesLive: function(){
return App.HostComponent.find().filterProperty('componentName', 'DATANODE').filterProperty("workStatus","STARTED");
}.property('service.hostComponents.@each'),
@@ -45,7 +54,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
}.property('service.hostComponents.@each'),
dataNodeHostText: function () {
- if(this.get("service.dataNodes") > 1){
+ if(this.get("service.dataNodes").content.length > 1){
+ return Em.I18n.t('services.service.summary.viewHosts');
+ }else{
+ return Em.I18n.t('services.service.summary.viewHost');
+ }
+ }.property("service"),
+
+ journalNodeHostText: function () {
+ if(this.get("service.journalNodes").content.length > 1){
return Em.I18n.t('services.service.summary.viewHosts');
}else{
return Em.I18n.t('services.service.summary.viewHost');
@@ -61,6 +78,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
}.property("service.dataNodes.length")
}),
+ journalNodesLiveTextView: App.ComponentLiveTextView.extend({
+ liveComponents: function() {
+ return App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').filterProperty("workStatus","STARTED").get("length");
+ }.property("service.hostComponents.@each"),
+ totalComponents: function() {
+ return this.get("service.journalNodes.length");
+ }.property("service.journalNodes.length")
+ }),
+
dfsTotalBlocks: function(){
return this.formatUnavailable(this.get('service.dfsTotalBlocks'));
}.property('service.dfsTotalBlocks'),
@@ -139,6 +165,10 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
return App.HostComponent.find().findProperty('componentName', 'DATANODE');
}.property(),
+ journalNodeComponent: function () {
+ return App.HostComponent.find().findProperty('componentName', 'JOURNALNODE');
+ }.property(),
+
isSafeMode: function () {
var safeMode = this.get('service.safeModeStatus');
return safeMode != null && safeMode.length > 0;