You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/01/09 22:26:48 UTC
ambari git commit: AMBARI-9079. After moving ATS,
ATS web ui is not working
Repository: ambari
Updated Branches:
refs/heads/trunk 29ef16162 -> 934208379
AMBARI-9079. After moving ATS, ATS web ui is not working
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/93420837
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93420837
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93420837
Branch: refs/heads/trunk
Commit: 9342083790a3e867659a773e84d23e8f7624a6a1
Parents: 29ef161
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Fri Jan 9 13:01:26 2015 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Fri Jan 9 13:01:34 2015 -0800
----------------------------------------------------------------------
.../main/service/reassign/step4_controller.js | 8 +++++++-
.../app/controllers/main/service/reassign_controller.js | 2 +-
ambari-web/app/messages.js | 8 ++++++++
ambari-web/app/views/main/service/reassign/step5_view.js | 9 ++++++++-
.../main/service/reassign/step4_controller_test.js | 11 +++++++++--
5 files changed, 33 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/93420837/ambari-web/app/controllers/main/service/reassign/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index 9ff2aa9..7e970ac 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -471,6 +471,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
break;
case 'APP_TIMELINE_SERVER':
urlParams.push('(type=yarn-site&tag=' + data.Clusters.desired_configs['yarn-site'].tag + ')');
+ urlParams.push('(type=yarn-env&tag=' + data.Clusters.desired_configs['yarn-env'].tag + ')');
break;
case 'OOZIE_SERVER':
urlParams.push('(type=oozie-site&tag=' + data.Clusters.desired_configs['oozie-site'].tag + ')');
@@ -527,6 +528,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
this.saveClusterStatus(secureConfigs, this.getComponentDir(configs, componentName));
this.saveConfigsToServer(configs);
+ this.saveServiceProperties(configs);
},
/**
@@ -1045,6 +1047,10 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
db_host, db_type, db_props['schema_name'], db_props['user_name'],
db_props['user_passwd'], db_props['driver_class'], db_props['db_connection_url']
);
- }.property('dbProperties')
+ }.property('dbProperties'),
+
+ saveServiceProperties: function(configs) {
+ App.router.get(this.get('content.controllerName')).saveServiceProperties(configs);
+ }
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/93420837/ambari-web/app/controllers/main/service/reassign_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js b/ambari-web/app/controllers/main/service/reassign_controller.js
index bfebf3e..adb0fad 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -55,7 +55,7 @@ App.ReassignMasterController = App.WizardController.extend({
hdfsUser: "hdfs",
group: "hadoop",
reassign: null,
- componentsWithManualCommands: ['NAMENODE', 'SECONDARY_NAMENODE', 'OOZIE_SERVER', 'MYSQL_SERVER'],
+ componentsWithManualCommands: ['NAMENODE', 'SECONDARY_NAMENODE', 'OOZIE_SERVER', 'MYSQL_SERVER', 'APP_TIMELINE_SERVER'],
hasManualSteps: false,
hasCheckDBStep: false,
componentsWithCheckDBStep: ['HIVE_METASTORE', 'HIVE_SERVER', 'OOZIE_SERVER'],
http://git-wip-us.apache.org/repos/asf/ambari/blob/93420837/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index d84cf5e..1fbaded 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1795,6 +1795,14 @@ Em.I18n.translations = {
'<div class="code-snippet">mysql db_name < backup-file.sql</div></li>' +
'</ol>' +
'</div>',
+ 'services.reassign.step5.body.app_timeline_server': '<div class="alert alert-info">' +
+ '<ol>' +
+ '<li>Copy <b>/hadoop/yarn/timeline/leveldb-timeline-store.ldb</b> from the source host <b>{1}</b> to <b>/hadoop/yarn/timeline/leveldb-timeline-store.ldb</b> on the target host <b>{2}</b>.</li>' +
+ '<li>Login to the target host <b>{2}</b> and change permissions by running:' +
+ '<div class="code-snippet">chown -R {3}:{5} /hadoop/yarn/timeline/leveldb-timeline-store.ldb</div></li>' +
+ '<div class="code-snippet">chmod -R 700 /hadoop/yarn/timeline/leveldb-timeline-store.ldb</div></li>' +
+ '</ol>' +
+ '</div>',
'services.reassign.step5.body.securityNotice': '<div class="alert alert-info"> <div class="alert alert-warn"> <strong>Note: </strong> Secure cluster' +
' requires generating necessary principals for reassigned component and creating keytab files with the principal on ' +
'the target host. The keytab file should be accessible to the service user.</div> {0} </div>',
http://git-wip-us.apache.org/repos/asf/ambari/blob/93420837/ambari-web/app/views/main/service/reassign/step5_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/reassign/step5_view.js b/ambari-web/app/views/main/service/reassign/step5_view.js
index 6947d4b..61ea860 100644
--- a/ambari-web/app/views/main/service/reassign/step5_view.js
+++ b/ambari-web/app/views/main/service/reassign/step5_view.js
@@ -36,7 +36,14 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
ha = '_ha';
var nnStartedHost = this.get('controller.content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName').without(sourceHost);
}
- return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha).format(componentDir, sourceHost, targetHost, this.get('controller.content.hdfsUser'), nnStartedHost,this.get('controller.content.group'), componentDirCmd);
+
+ var user = this.get('controller.content.hdfsUser');
+
+ if(this.get('controller.content.reassign.component_name') === 'APP_TIMELINE_SERVER') {
+ user = this.get('controller.content.serviceProperties.yarn-env.yarn_user');
+ }
+
+ return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha).format(componentDir, sourceHost, targetHost, user, nnStartedHost,this.get('controller.content.group'), componentDirCmd);
}.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser'),
securityNotice: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/93420837/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 9b41a2c..2d88c62 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -497,7 +497,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
{
componentName: 'APP_TIMELINE_SERVER',
result: [
- "(type=yarn-site&tag=5)"
+ "(type=yarn-site&tag=5)",
+ "(type=yarn-env&tag=8)",
]
},
{
@@ -523,7 +524,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
'mapred-site': {tag: 4},
'yarn-site': {tag: 5},
'oozie-site': {tag: 6},
- 'webhcat-site': {tag: 7}
+ 'webhcat-site': {tag: 7},
+ 'yarn-env': {tag: 8}
}
}
};
@@ -582,6 +584,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
sinon.stub(controller, 'getComponentDir', Em.K);
sinon.stub(controller, 'saveClusterStatus', Em.K);
sinon.stub(controller, 'saveConfigsToServer', Em.K);
+ sinon.stub(controller, 'saveServiceProperties', Em.K);
controller.set('content.reassignHosts.target', 'host1');
});
afterEach(function () {
@@ -592,6 +595,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
controller.getComponentDir.restore();
controller.saveClusterStatus.restore();
controller.saveConfigsToServer.restore();
+ controller.saveServiceProperties.restore();
});
it('component is not NAMENODE', function () {
@@ -604,6 +608,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
expect(controller.getComponentDir.calledWith({}, 'COMP1')).to.be.true;
expect(controller.saveClusterStatus.calledWith([])).to.be.true;
expect(controller.saveConfigsToServer.calledWith({})).to.be.true;
+ expect(controller.saveServiceProperties.calledWith({})).to.be.true;
});
it('component is NAMENODE, has configs', function () {
controller.set('content.reassign.component_name', 'NAMENODE');
@@ -620,6 +625,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
expect(controller.getComponentDir.calledWith({'hdfs-site': {}}, 'NAMENODE')).to.be.true;
expect(controller.saveClusterStatus.calledWith([])).to.be.true;
expect(controller.saveConfigsToServer.calledWith({'hdfs-site': {}})).to.be.true;
+ expect(controller.saveServiceProperties.calledWith({'hdfs-site': {}})).to.be.true;
});
it('component is RESOURCEMANAGER, has configs', function () {
controller.set('content.reassign.component_name', 'RESOURCEMANAGER');
@@ -636,6 +642,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
expect(controller.getComponentDir.calledWith({'hdfs-site': {}}, 'RESOURCEMANAGER')).to.be.true;
expect(controller.saveClusterStatus.calledWith([])).to.be.true;
expect(controller.saveConfigsToServer.calledWith({'hdfs-site': {}})).to.be.true;
+ expect(controller.saveServiceProperties.calledWith({'hdfs-site': {}})).to.be.true;
});
});