Author: yusaku
Date: Wed May 29 02:04:09 2013
New Revision: 1487200

URL: http://svn.apache.org/r1487200
Log:
AMBARI-2210. Hadoop 2 stack version check should be integer based instead of 
string. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
    incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1487200&r1=1487199&r2=1487200&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 29 02:04:09 2013
@@ -899,6 +899,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2210.  Hadoop 2 stack version check should be integer based instead of
+ string. (yusaku)
+
  AMBARI-2208. Reassign Master Wizard: refreshing page on step 2, 3 or 4 breaks
  wizard. (yusaku)
 

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1487200&r1=1487199&r2=1487200&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js 
Wed May 29 02:04:09 2013
@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+var stringUtils = require('utils/string_utils');
 
 App.WizardStep8Controller = Em.Controller.extend({
   name: 'wizardStep8Controller',
@@ -1417,7 +1418,8 @@ App.WizardStep8Controller = Em.Controlle
     var hdfsProperties = {};
     hdfsSiteObj.forEach(function (_configProperty) {
 
-      if (App.get('currentStackVersionNumber') >= '2.0.0') {
+      if (stringUtils.compareVersions(App.get('currentStackVersionNumber'), 
'2.0.0') === 1 ||
+          stringUtils.compareVersions(App.get('currentStackVersionNumber'), 
'2.0.0') === 0) {
         // TODO Remove temporary hack. This was added to not set
         // dfs.hosts and dfs.hosts.exclude properties on HDP 2 stacks.
         if ("dfs.hosts"==_configProperty.name || 
"dfs.hosts.exclude"==_configProperty.name) {

Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js?rev=1487200&r1=1487199&r2=1487200&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js Wed May 
29 02:04:09 2013
@@ -17,11 +17,12 @@
  */
 
 var App = require('app');
+var stringUtils = require('utils/string_utils');
 
 App.MainAdminClusterView = Em.View.extend({
   templateName: require('templates/main/admin/cluster'),
 
   isUpgradeAvailable: function(){
-    return this.get('controller.upgradeVersion').replace(/HDP-/, '') > 
App.get('currentStackVersionNumber');
+    return 
stringUtils.compareVersions(this.get('controller.upgradeVersion').replace(/HDP(Local)?-/,
 ''), App.get('currentStackVersionNumber')) === 1;
   }.property('controller.upgradeVersion', 'App.currentStackVersion')
 });
\ No newline at end of file


Reply via email to