Browse Source

AMBARI-8920. NN HA wizzard is broken (onechiporenko)

Oleg Nechiporenko 10 years ago
parent
commit
942ad74ead

+ 1 - 1
ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js

@@ -45,7 +45,7 @@ App.HighAvailabilityWizardStep4Controller = Em.Controller.extend({
   checkNnCheckPointStatus: function (data) {
     this.set('isNameNodeStarted', data.HostRoles.desired_state === 'STARTED');
     var self = this;
-    var journalTransactionInfo = $.parseJSON(Em.get(data, 'metrics.dfs.namenode.JournalNodeTransactionInfo'));
+    var journalTransactionInfo = $.parseJSON(Em.get(data, 'metrics.dfs.namenode.JournalTransactionInfo'));
     var isInSafeMode = !Em.isEmpty(Em.get(data, 'metrics.dfs.namenode.Safemode'));
     // in case when transaction info absent or invalid return 2 which will return false in next `if` statement
     journalTransactionInfo = !!journalTransactionInfo ? (parseInt(journalTransactionInfo.LastAppliedOrWrittenTxId) - parseInt(journalTransactionInfo.MostRecentCheckpointTxId)) : 2;

+ 3 - 3
ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js

@@ -49,7 +49,7 @@ describe('App.HighAvailabilityWizardStep4Controller', function() {
           HostRoles: { desired_state: 'STARTED' },
           metrics: { dfs: { namenode: {
             Safemode: 'ON',
-            JournalNodeTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"4\",\"MostRecentCheckpointTxId\":\"2\"}"
+            JournalTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"4\",\"MostRecentCheckpointTxId\":\"2\"}"
           }}}
         },
         m: 'NameNode started, Safemode on, journal node transaction invalid. Polling should be performed and isNameNodeStarted should be true',
@@ -64,7 +64,7 @@ describe('App.HighAvailabilityWizardStep4Controller', function() {
           HostRoles: { desired_state: 'INSTALLED' },
           metrics: { dfs: { namenode: {
             Safemode: 'ON',
-            JournalNodeTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"15\",\"MostRecentCheckpointTxId\":\"14\"}"
+            JournalTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"15\",\"MostRecentCheckpointTxId\":\"14\"}"
           }}}
         },
         m: 'NameNode not started, Safemode on, journal node transaction present. Polling should not be performed and isNameNodeStarted should be false',
@@ -79,7 +79,7 @@ describe('App.HighAvailabilityWizardStep4Controller', function() {
           HostRoles: { desired_state: 'STARTED' },
           metrics: { dfs: { namenode: {
             Safemode: "",
-            JournalNodeTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"15\",\"MostRecentCheckpointTxId\":\"14\"}"
+            JournalTransactionInfo: "{\"LastAppliedOrWrittenTxId\":\"15\",\"MostRecentCheckpointTxId\":\"14\"}"
           }}}
         },
         m: 'NameNode started, Safemode off, journal node transaction present. Polling should not be performed and isNameNodeStarted should be true',