You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/12/13 02:58:42 UTC

git commit: AMBARI-4060. HDFS/JournalNodes relations in EmberData. (srimanth)

Updated Branches:
  refs/heads/trunk abb68972e -> 7f92051d0


AMBARI-4060. HDFS/JournalNodes relations in EmberData. (srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7f92051d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f92051d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f92051d

Branch: refs/heads/trunk
Commit: 7f92051d019729f36d5ca9371cae4f600024f972
Parents: abb6897
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Thu Dec 12 17:53:32 2013 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Thu Dec 12 17:53:32 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/mappers/server_data_mapper.js    |  1 +
 ambari-web/app/models/service/hdfs.js           |  1 -
 .../app/views/main/dashboard/service/hdfs.js    | 21 +++++++-------------
 3 files changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f92051d/ambari-web/app/mappers/server_data_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/server_data_mapper.js b/ambari-web/app/mappers/server_data_mapper.js
index 53d3c85..d50dd85 100644
--- a/ambari-web/app/mappers/server_data_mapper.js
+++ b/ambari-web/app/mappers/server_data_mapper.js
@@ -153,6 +153,7 @@ App.QuickDataMapper.componentServiceMap = {
   'SECONDARY_NAMENODE': 'HDFS',
   'DATANODE': 'HDFS',
   'HDFS_CLIENT': 'HDFS',
+  'JOURNALNODE': 'HDFS',
   'JOBTRACKER': 'MAPREDUCE',
   'TASKTRACKER': 'MAPREDUCE',
   'MAPREDUCE_CLIENT': 'MAPREDUCE',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f92051d/ambari-web/app/models/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/hdfs.js b/ambari-web/app/models/service/hdfs.js
index 2f3871f..b5a5323 100644
--- a/ambari-web/app/models/service/hdfs.js
+++ b/ambari-web/app/models/service/hdfs.js
@@ -27,7 +27,6 @@ App.HDFSService = App.Service.extend({
   dataNodes: function(){
     return this.get('hostComponents').filterProperty('componentName', 'DATANODE').mapProperty('host');
   }.property('hostComponents.length'),
-  journalNodes: DS.hasMany('App.Host'),
   nameNodeStartTime: DS.attr('number'),
   jvmMemoryHeapUsed: DS.attr('number'),
   jvmMemoryHeapMax: DS.attr('number'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f92051d/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 ec19434..c6be5b3 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -68,16 +68,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
     return App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').get('length') > 0;
   }.property('service.hostComponents.@each'),
 
-  journalNodeHostText: function () {
-    if (this.get("service.journalNodes").content.length == 0) {
-      return '';
-    } else 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');
-    }
-  }.property("service"),
-
   dataNodesLiveTextView: App.ComponentLiveTextView.extend({
     liveComponents: function() {
       return App.HostComponent.find().filterProperty('componentName', 'DATANODE').filterProperty("workStatus","STARTED").get("length");
@@ -88,12 +78,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
   }),
 
   journalNodesLiveTextView: App.ComponentLiveTextView.extend({
+    allJournalNodes: function () {
+      return App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE')
+    }.property('service.hostComponents.@each'),
     liveComponents: function() {
-      return App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').filterProperty("workStatus","STARTED").get("length");
-    }.property("service.hostComponents.@each"),
+      return this.get('allJournalNodes').filterProperty("workStatus","STARTED").get("length");
+    }.property("allJournalNodes"),
     totalComponents: function() {
-      return this.get("service.journalNodes.length");
-    }.property("service.journalNodes.length")
+      return this.get('allJournalNodes').get("length");
+    }.property("allJournalNodes")
   }),
 
   dfsTotalBlocks: function(){