Author: jaimin
Date: Mon Apr 15 23:20:22 2013
New Revision: 1468270
URL: http://svn.apache.org/r1468270
Log:
AMBARI-1941. Create a flag to toggle the support for multiple HBase Masters.
(jaimin)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/config.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step6_controller.js
incubator/ambari/trunk/ambari-web/app/models/service.js
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
incubator/ambari/trunk/ambari-web/app/utils/ajax.js
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Apr 15 23:20:22 2013
@@ -258,6 +258,9 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1941. Create a flag to toggle the support for multiple
+ HBase Masters. (jaimin)
+
AMBARI-1940. Create a flag to toggle the support for additional database
support in Hive and Oozie. (jaimin)
Modified: incubator/ambari/trunk/ambari-web/app/config.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/config.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/config.js Mon Apr 15 23:20:22 2013
@@ -47,7 +47,8 @@ App.supports = {
stackUpgrade: false,
capacitySchedulerUi: false,
startStopAllServices: false,
- hiveOozieExtraDatabases: false
+ hiveOozieExtraDatabases: false,
+ multipleHBaseMasters: false
};
if (App.enableExperimental) {
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js
Mon Apr 15 23:20:22 2013
@@ -71,7 +71,9 @@ App.WizardStep5Controller = Em.Controlle
this.renderComponents(this.loadComponents());
this.updateComponent('ZOOKEEPER_SERVER');
- this.updateComponent('HBASE_MASTER');
+ if(App.supports.multipleHBaseMasters){
+ this.updateComponent('HBASE_MASTER');
+ }
if (!this.get("selectedServicesMasters").filterProperty('isInstalled',
false).length) {
console.log('no master components to add');
@@ -216,7 +218,7 @@ App.WizardStep5Controller = Em.Controlle
if (item.display_name === "ZooKeeper") {
componentObj.set('zId', zid++);
componentObj.set("showRemoveControl", showRemoveControlZk);
- } else if(item.component_name === "HBASE_MASTER"){
+ } else if(App.supports.multipleHBaseMasters && item.component_name ===
"HBASE_MASTER"){
componentObj.set('zId', hid++);
componentObj.set("showRemoveControl", showRemoveControlHb);
}
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step6_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step6_controller.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step6_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step6_controller.js
Mon Apr 15 23:20:22 2013
@@ -186,7 +186,7 @@ App.WizardStep6Controller = Em.Controlle
var headers = [];
if (this.get('isMasters')) {
- if (this.isServiceSelected('HBASE')) {
+ if (this.isServiceSelected('HBASE') &&
App.supports.multipleHBaseMasters) {
headers.pushObject(Em.Object.create({
name: 'HBASE_MASTER',
label: self.getComponentDisplayName('HBASE_MASTER')
@@ -368,7 +368,10 @@ App.WizardStep6Controller = Em.Controlle
masterComponentHosts.forEach(function(item) {
var host = hostsObj.findProperty('hostName', item.hostName);
if (host) {
- host.get('checkboxes').findProperty('title',
item.display_name).set('checked', true);
+ var checkbox = host.get('checkboxes').findProperty('title',
item.display_name);
+ if(checkbox){
+ checkbox.set('checked', true);
+ }
}
});
}
Modified: incubator/ambari/trunk/ambari-web/app/models/service.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/service.js Mon Apr 15 23:20:22
2013
@@ -48,7 +48,7 @@ App.Service = DS.Model.extend({
updateHealthStatus: function () {
// console.log('model:service.healthStatus ' + this.get('serviceName'));
var components = this.get('hostComponents').filterProperty('isMaster',
true);
- var isGreen = (this.get('serviceName') === 'HBASE' ?
+ var isGreen = (this.get('serviceName') === 'HBASE' &&
App.supports.multipleHBaseMasters ?
components.someProperty('workStatus', App.HostComponentStatus.started) :
components.everyProperty('workStatus', App.HostComponentStatus.started))
;
Modified:
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
(original)
+++
incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/hbase.hbs
Mon Apr 15 23:20:22 2013
@@ -46,7 +46,7 @@
<td>{{t dashboard.services.hbase.masterServer}}</td>
<td>
{{#if view.activeMaster}}
- <a href="#" {{action showDetails view.activeMaster.host}}>{{t
service.hbase.activeMaster}}</a>
+ <a href="#" {{action showDetails
view.activeMaster.host}}>{{view.activeMasterTitle}}</a>
{{#if view.passiveMasters.length}}
{{view.passiveMasterOutput}}
{{/if}}
Modified: incubator/ambari/trunk/ambari-web/app/utils/ajax.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/ajax.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/ajax.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/ajax.js Mon Apr 15 23:20:22 2013
@@ -598,7 +598,7 @@ var urls = {
}
},
'wizard.step9.add_host.launch_start_services': {
- 'real':
'/clusters/{cluste}/host_components?(HostRoles/component_name=GANGLIA_MONITOR|HostRoles/component_name=HBASE_REGIONSERVER|HostRoles/component_name=DATANODE|HostRoles/component_name=TASKTRACKER)&(HostRoles/state=INSTALLED)',
+ 'real':
'/clusters/{cluster}/host_components?(HostRoles/component_name=GANGLIA_MONITOR|HostRoles/component_name=HBASE_REGIONSERVER|HostRoles/component_name=DATANODE|HostRoles/component_name=TASKTRACKER)&(HostRoles/state=INSTALLED)',
'mock': '/data/wizard/deploy/5_hosts/poll_6.json',
'format': function (data, opt) {
return {
Modified:
incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1468270&r1=1468269&r2=1468270&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
Mon Apr 15 23:20:22 2013
@@ -31,7 +31,10 @@ App.MainDashboardServiceHbaseView = App.
* Passive master components
*/
passiveMasters: function () {
- return this.get('masters').filterProperty('haStatus', 'passive');
+ if(App.supports.multipleHBaseMasters){
+ return this.get('masters').filterProperty('haStatus', 'passive');
+ }
+ return [];
}.property('masters'),
/**
* Formatted output for passive master components
@@ -43,9 +46,21 @@ App.MainDashboardServiceHbaseView = App.
* One(!) active master component
*/
activeMaster: function () {
- return this.get('masters').findProperty('haStatus', 'active');
+ if(App.supports.multipleHBaseMasters){
+ return this.get('masters').findProperty('haStatus', 'active');
+ } else {
+ return this.get('masters')[0];
+ }
}.property('masters'),
+ activeMasterTitle: function(){
+ if(App.supports.multipleHBaseMasters){
+ return this.t('service.hbase.activeMaster');
+ } else {
+ return this.get('activeMaster.host.publicHostName');
+ }
+ }.property('activeMaster'),
+
masterServerHeapSummary: function () {
var heapUsed = this.get('service').get('heapMemoryUsed');
var heapMax = this.get('service').get('heapMemoryMax');