ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-9620. Useless alerts on confirm customization page (onechiporenko)
Date Fri, 13 Feb 2015 12:28:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 63c683f32 -> 6f4045eb3


AMBARI-9620. Useless alerts on confirm customization page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 6f4045eb3b6bbcde7cd3664bcbd12735e3397442
Parents: 63c683f
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Fri Feb 13 14:18:08 2015 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Fri Feb 13 14:18:08 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/app.js                       |   8 +
 ambari-web/app/data/HDP2/site_properties.js | 186 ++++++++++++-----------
 ambari-web/test/app_test.js                 |  53 +++++++
 3 files changed, 158 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f4045eb/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 41e74dc..b5ca7d8 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -157,6 +157,14 @@ module.exports = Em.Application.create({
     return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.2") >
-1);
   }.property('currentStackVersionNumber'),
 
+  /**
+   * Determines if current stack is 2.0.*
+   * @type {boolean}
+   */
+  isHadoop20Stack: function () {
+    return (stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.1") ==
-1 && stringUtils.compareVersions(this.get('currentStackVersionNumber'), "2.0") >
-1);
+  }.property('currentStackVersionNumber'),
+
   isHadoopWindowsStack: function() {
     return this.get('currentStackName') == "HDPWIN";
   }.property('currentStackName'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/6f4045eb/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 16886ba..60bcbe0 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -301,95 +301,6 @@ var hdp2properties = [
     "serviceName": "YARN",
     "filename": "yarn-site.xml"
   },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.enabled",
-    "displayName": "yarn.timeline-service.enabled",
-    "category": "APP_TIMELINE_SERVER",
-    "displayType": "checkbox",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.leveldb-timeline-store.path",
-    "displayName": "yarn.timeline-service.leveldb-timeline-store.path",
-    "defaultDirectory": "/hadoop/yarn/timeline",
-    "category": "APP_TIMELINE_SERVER",
-    "displayType": "directory",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms",
-    "displayName": "yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms",
-    "displayType": "int",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.store-class",
-    "displayName": "yarn.timeline-service.store-class",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.ttl-enable",
-    "displayName": "yarn.timeline-service.ttl-enable",
-    "displayType": "checkbox",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.ttl-ms",
-    "displayName": "yarn.timeline-service.ttl-ms",
-    "displayType": "int",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.generic-application-history.store-class",
-    "displayName": "yarn.timeline-service.generic-application-history.store-class",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.webapp.address",
-    "displayName": "yarn.timeline-service.webapp.address",
-    "displayType": "string",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.webapp.https.address",
-    "displayName": "yarn.timeline-service.webapp.https.address",
-    "displayType": "string",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
-  {
-    "id": "site property",
-    "name": "yarn.timeline-service.address",
-    "displayName": "yarn.timeline-service.address",
-    "displayType": "string",
-    "category": "APP_TIMELINE_SERVER",
-    "serviceName": "YARN",
-    "filename": "yarn-site.xml"
-  },
 /**********************************************MAPREDUCE2***************************************/
   {
     "id": "site property",
@@ -4653,6 +4564,7 @@ var hdp2properties = [
     "index": 6
   }
 ];
+
 if (App.get('isHadoopWindowsStack')) {
   hdp2properties.push(
     {
@@ -4689,6 +4601,102 @@ if (App.get('isHadoopWindowsStack')) {
   );
 }
 
+var atsProperties = [
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.enabled",
+    "displayName": "yarn.timeline-service.enabled",
+    "category": "APP_TIMELINE_SERVER",
+    "displayType": "checkbox",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.leveldb-timeline-store.path",
+    "displayName": "yarn.timeline-service.leveldb-timeline-store.path",
+    "defaultDirectory": "/hadoop/yarn/timeline",
+    "category": "APP_TIMELINE_SERVER",
+    "displayType": "directory",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms",
+    "displayName": "yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms",
+    "displayType": "int",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.store-class",
+    "displayName": "yarn.timeline-service.store-class",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.ttl-enable",
+    "displayName": "yarn.timeline-service.ttl-enable",
+    "displayType": "checkbox",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.ttl-ms",
+    "displayName": "yarn.timeline-service.ttl-ms",
+    "displayType": "int",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.generic-application-history.store-class",
+    "displayName": "yarn.timeline-service.generic-application-history.store-class",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.webapp.address",
+    "displayName": "yarn.timeline-service.webapp.address",
+    "displayType": "string",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.webapp.https.address",
+    "displayName": "yarn.timeline-service.webapp.https.address",
+    "displayType": "string",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  },
+  {
+    "id": "site property",
+    "name": "yarn.timeline-service.address",
+    "displayName": "yarn.timeline-service.address",
+    "displayType": "string",
+    "category": "APP_TIMELINE_SERVER",
+    "serviceName": "YARN",
+    "filename": "yarn-site.xml"
+  }
+];
+
+if (!App.get('isHadoop20Stack')) {
+  hdp2properties.pushObjects(atsProperties);
+}
+
 module.exports =
 {
   "configProperties": hdp2properties

http://git-wip-us.apache.org/repos/asf/ambari/blob/6f4045eb/ambari-web/test/app_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js
index f062ce7..8f6a30a 100644
--- a/ambari-web/test/app_test.js
+++ b/ambari-web/test/app_test.js
@@ -476,4 +476,57 @@ describe('App', function () {
       expect(App.isAccessible('')).to.be.false;
     });
   });
+
+  describe('#isHadoop20Stack', function () {
+
+    Em.A([
+      {
+        currentStackVersion: 'HDP-2.2',
+        e: false
+      },
+        {
+          currentStackVersion: 'HDP-2.1',
+          e: false
+        },
+        {
+          currentStackVersion: 'HDP-2.0',
+          e: true
+        },
+        {
+          currentStackVersion: 'HDP-2.0.0',
+          e: true
+        },
+        {
+          currentStackVersion: 'HDP-2.0.6',
+          e: true
+        },
+        {
+          currentStackVersion: 'HDPLocal-2.2',
+          e: false
+        },
+        {
+          currentStackVersion: 'HDPLocal-2.1',
+          e: false
+        },
+        {
+          currentStackVersion: 'HDPLocal-2.0',
+          e: true
+        },
+        {
+          currentStackVersion: 'HDPLocal-2.0.0',
+          e: true
+        },
+        {
+          currentStackVersion: 'HDPLocal-2.0.6',
+          e: true
+        }
+    ]).forEach(function (test) {
+        it('for ' + test.currentStackVersion + ' isHadoop20Stack = ' + test.e.toString(),
function () {
+          App.set('currentStackVersion', test.currentStackVersion);
+          expect(App.get('isHadoop20Stack')).to.equal(test.e);
+        });
+      });
+
+  });
+
 });


Mime
View raw message