You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/12/15 12:04:42 UTC

ambari git commit: AMBARI-14382 ambari intermittently not able to detect the active NN. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk ffb4d3b8c -> 729a6c8f3


AMBARI-14382 ambari intermittently not able to detect the active NN. (atkach)


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

Branch: refs/heads/trunk
Commit: 729a6c8f3bd554d7f8e73d23012ad87579bc1378
Parents: ffb4d3b
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Tue Dec 15 12:58:04 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Tue Dec 15 12:58:04 2015 +0200

----------------------------------------------------------------------
 .../stacks/HDP/2.3/services/HDFS/widgets.json       |  6 ++++--
 .../app/controllers/global/cluster_controller.js    |  9 ++++++++-
 ambari-web/app/views/common/quick_view_link_view.js | 16 +++++++++++++++-
 3 files changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/729a6c8f/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json
index e47d431..1010128 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/widgets.json
@@ -304,7 +304,8 @@
               "name": "Hadoop:service=NameNode,name=FSNamesystem.CorruptBlocks",
               "metric_path": "metrics/dfs/FSNamesystem/CorruptBlocks",
               "service_name": "HDFS",
-              "component_name": "NAMENODE"
+              "component_name": "NAMENODE",
+              "host_component_criteria": "host_components/metrics/dfs/FSNamesystem/HAState=active"
             }
           ],
           "values": [
@@ -328,7 +329,8 @@
               "name": "Hadoop:service=NameNode,name=FSNamesystem.UnderReplicatedBlocks",
               "metric_path": "metrics/dfs/FSNamesystem/UnderReplicatedBlocks",
               "service_name": "HDFS",
-              "component_name": "NAMENODE"
+              "component_name": "NAMENODE",
+              "host_component_criteria": "host_components/metrics/dfs/FSNamesystem/HAState=active"
             }
           ],
           "values": [

http://git-wip-us.apache.org/repos/asf/ambari/blob/729a6c8f/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index a8f45d7..3c28e80 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -43,6 +43,11 @@ App.ClusterController = Em.Controller.extend(App.ReloadPopupMixin, {
   isServiceMetricsLoaded: false,
 
   /**
+   * @type {boolean}
+   */
+  isHostComponentMetricsLoaded: false,
+
+  /**
    * Ambari uses custom jdk.
    * @type {Boolean}
    */
@@ -245,7 +250,9 @@ App.ClusterController = Em.Controller.extend(App.ReloadPopupMixin, {
           updater.updateServiceMetric(function () {
             self.set('isServiceMetricsLoaded', true);
             // make second call, because first is light since it doesn't request host-component metrics
-            updater.updateServiceMetric(Em.K);
+            updater.updateServiceMetric(function() {
+              self.set('isHostComponentMetricsLoaded', true);
+            });
             // components config loading doesn't affect overall progress
             updater.updateComponentConfig(function () {
               self.set('isComponentsConfigLoaded', true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/729a6c8f/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index 175fa2f..e2e8d46 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -83,11 +83,25 @@ App.QuickViewLinks = Em.View.extend({
     this.get('quickLinks').clear();
   },
 
+  /**
+   * The flags responsible for data to build quick links:
+   * - App.router.clusterController.isServiceMetricsLoaded
+   *
+   * The flags responsible for correct, up-to-date state of quick links:
+   * - App.currentStackVersionNumber
+   * - App.singleNodeInstall
+   * - App.router.clusterController.isHostComponentMetricsLoaded
+   */
   setQuickLinks: function () {
     if (App.get('router.clusterController.isServiceMetricsLoaded')) {
       this.loadTags();
     }
-  }.observes('App.currentStackVersionNumber', 'App.singleNodeInstall', 'App.router.clusterController.isServiceMetricsLoaded'),
+  }.observes(
+    'App.currentStackVersionNumber',
+    'App.singleNodeInstall',
+    'App.router.clusterController.isServiceMetricsLoaded',
+    'App.router.clusterController.isHostComponentMetricsLoaded'
+  ),
 
   /**
    * call for configuration tags