Repository: ambari Updated Branches: refs/heads/trunk e8d6672ce -> 942ad74ea
AMBARI-8920. NN HA wizzard is broken (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/942ad74e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/942ad74e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/942ad74e Branch: refs/heads/trunk Commit: 942ad74ead4593e85e95b572e861a6b3d94b86a9 Parents: e8d6672 Author: Oleg Nechiporenko <[email protected]> Authored: Fri Dec 26 14:17:49 2014 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Fri Dec 26 14:17:49 2014 +0200 ---------------------------------------------------------------------- .../main/admin/highAvailability/nameNode/step4_controller.js | 2 +- .../admin/highAvailability/nameNode/step4_controller_test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/942ad74e/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js index cced64f..445f805 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js +++ b/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; http://git-wip-us.apache.org/repos/asf/ambari/blob/942ad74e/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js index fc99104..1136052 100644 --- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js +++ b/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',
