Просмотр исходного кода

AMBARI-15088. Incorrect information shown for 'leveldb-timeline-store' location while moving App Timeline Server component. (alexantonenko)

Alex Antonenko 9 лет назад
Родитель
Сommit
0c568cc8a2
2 измененных файлов с 12 добавлено и 10 удалено
  1. 3 3
      ambari-web/app/messages.js
  2. 9 7
      ambari-web/app/views/main/service/reassign/step5_view.js

+ 3 - 3
ambari-web/app/messages.js

@@ -2093,10 +2093,10 @@ Em.I18n.translations = {
     '</div>',
     '</div>',
   'services.reassign.step5.body.app_timeline_server': '<div class="alert alert-info">' +
   'services.reassign.step5.body.app_timeline_server': '<div class="alert alert-info">' +
   '<ol>' +
   '<ol>' +
-  '<li>Copy <b>{7}/leveldb-timeline-store.ldb</b> from the source host <b>{1}</b> to <b>{7}/leveldb-timeline-store.ldb</b> on the target host <b>{2}</b>.</li>' +
+  '<li>Copy <b>{7}/{8}</b> from the source host <b>{1}</b> to <b>{7}/{8}</b> on the target host <b>{2}</b>.</li>' +
   '<li>Login to the target host <b>{2}</b> and change permissions by running:' +
   '<li>Login to the target host <b>{2}</b> and change permissions by running:' +
-  '<div class="code-snippet">chown -R {3}:{5} {7}/leveldb-timeline-store.ldb</div></li>' +
-  '<div class="code-snippet">chmod -R 700 {7}/leveldb-timeline-store.ldb</div></li>' +
+  '<div class="code-snippet">chown -R {3}:{5} {7}/{8}</div></li>' +
+  '<div class="code-snippet">chmod -R 700 {7}/{8}</div></li>' +
   '</ol>' +
   '</ol>' +
   '</div>',
   '</div>',
   'services.reassign.step5.body.securityNotice': '<div class="alert alert-info"> <div class="alert alert-warn"> <strong>Note: </strong> Secure cluster' +
   'services.reassign.step5.body.securityNotice': '<div class="alert alert-info"> <div class="alert alert-warn"> <strong>Note: </strong> Secure cluster' +

+ 9 - 7
ambari-web/app/views/main/service/reassign/step5_view.js

@@ -27,12 +27,14 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
     if (!this.get('controller.content.componentsWithManualCommands').contains(this.get('controller.content.reassign.component_name'))) {
     if (!this.get('controller.content.componentsWithManualCommands').contains(this.get('controller.content.reassign.component_name'))) {
       return '';
       return '';
     }
     }
-    var componentDir = this.get('controller.content.componentDir') || '';
-    var componentDirCmd = componentDir.replace(/,/g, ' ');
-    var sourceHost = this.get('controller.content.reassignHosts.source');
-    var targetHost = this.get('controller.content.reassignHosts.target');
-    var ha = '';
-    var user = this.get('controller.content.hdfsUser'), path;
+    var
+      atsDir = App.get('isHadoop23Stack') ? "timeline-state-store.ldb" : "leveldb-timeline-store.ldb",
+      componentDir = this.get('controller.content.componentDir') || '',
+      componentDirCmd = componentDir.replace(/,/g, ' '),
+      sourceHost = this.get('controller.content.reassignHosts.source'),
+      targetHost = this.get('controller.content.reassignHosts.target'),
+      ha = '',
+      user = this.get('controller.content.hdfsUser'), path;
 
 
     if (this.get('controller.content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) {
     if (this.get('controller.content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) {
       ha = '_ha';
       ha = '_ha';
@@ -45,7 +47,7 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
     }
     }
 
 
     return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha).
     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, path);
+      format(componentDir, sourceHost, targetHost, user, nnStartedHost,this.get('controller.content.group'), componentDirCmd, path, atsDir);
   }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser'),
   }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser'),
 
 
   /**
   /**