فهرست منبع

AMBARI-5360. Storm local directory set up by Ambari does not follow the convention used for other services. (jaimin)

Jaimin Jetly 11 سال پیش
والد
کامیت
5bc56f3642
2فایلهای تغییر یافته به همراه19 افزوده شده و 5 حذف شده
  1. 2 0
      ambari-web/app/data/HDP2/site_properties.js
  2. 17 5
      ambari-web/app/models/service_config.js

+ 2 - 0
ambari-web/app/data/HDP2/site_properties.js

@@ -624,6 +624,8 @@ module.exports =
       "id": "site property",
       "id": "site property",
       "name": "storm.local.dir",
       "name": "storm.local.dir",
       "displayName": "storm.local.dir",
       "displayName": "storm.local.dir",
+      "defaultDirectory": "/hadoop/storm",
+      "displayType": "directory",
       "serviceName": "STORM",
       "serviceName": "STORM",
       "category": "General"
       "category": "General"
     },
     },

+ 17 - 5
ambari-web/app/models/service_config.js

@@ -457,6 +457,7 @@ App.ServiceConfigProperty = Ember.Object.extend({
       case 'zk_data_dir':
       case 'zk_data_dir':
       case 'oozie_data_dir':
       case 'oozie_data_dir':
       case 'hbase.tmp.dir':
       case 'hbase.tmp.dir':
+      case 'storm.local.dir':
         this.unionAllMountPoints(isOnlyFirstOneNeeded, localDB);
         this.unionAllMountPoints(isOnlyFirstOneNeeded, localDB);
         break;
         break;
     }
     }
@@ -495,17 +496,18 @@ App.ServiceConfigProperty = Ember.Object.extend({
     });
     });
     var temp = '';
     var temp = '';
     var setOfHostNames = [];
     var setOfHostNames = [];
+    var components = [];
     switch (this.get('name')) {
     switch (this.get('name')) {
       case 'dfs.namenode.name.dir':
       case 'dfs.namenode.name.dir':
       case 'dfs.name.dir':
       case 'dfs.name.dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'NAMENODE');
+        components = masterComponentHostsInDB.filterProperty('component', 'NAMENODE');
         components.forEach(function (component) {
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
           setOfHostNames.push(component.hostName);
         }, this);
         }, this);
         break;
         break;
       case 'fs.checkpoint.dir':
       case 'fs.checkpoint.dir':
       case 'dfs.namenode.checkpoint.dir':
       case 'dfs.namenode.checkpoint.dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'SECONDARY_NAMENODE');
+        components = masterComponentHostsInDB.filterProperty('component', 'SECONDARY_NAMENODE');
         components.forEach(function (component) {
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
           setOfHostNames.push(component.hostName);
         }, this);
         }, this);
@@ -531,23 +533,33 @@ App.ServiceConfigProperty = Ember.Object.extend({
         }, this);
         }, this);
         break;
         break;
       case 'zk_data_dir':
       case 'zk_data_dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER');
+        components = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER');
         components.forEach(function (component) {
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
           setOfHostNames.push(component.hostName);
         }, this);
         }, this);
         break;
         break;
       case 'oozie_data_dir':
       case 'oozie_data_dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'OOZIE_SERVER');
+        components = masterComponentHostsInDB.filterProperty('component', 'OOZIE_SERVER');
         components.forEach(function (component) {
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
           setOfHostNames.push(component.hostName);
         }, this);
         }, this);
         break;
         break;
       case 'hbase.tmp.dir':
       case 'hbase.tmp.dir':
-        var temp = slaveComponentHostsInDB.findProperty('componentName', 'HBASE_REGIONSERVER');
+        temp = slaveComponentHostsInDB.findProperty('componentName', 'HBASE_REGIONSERVER');
         temp.hosts.forEach(function (host) {
         temp.hosts.forEach(function (host) {
           setOfHostNames.push(host.hostName);
           setOfHostNames.push(host.hostName);
         }, this);
         }, this);
         break;
         break;
+      case 'storm.local.dir':
+        temp = slaveComponentHostsInDB.findProperty('componentName', 'SUPERVISOR');
+        temp.hosts.forEach(function (host) {
+          setOfHostNames.push(host.hostName);
+        }, this);
+        components = masterComponentHostsInDB.filterProperty('component', 'NIMBUS');
+        components.forEach(function (component) {
+          setOfHostNames.push(component.hostName);
+        }, this);
+        break;
     }
     }
 
 
     // In Add Host Wizard, if we did not select this slave component for any host, then we don't process any further.
     // In Add Host Wizard, if we did not select this slave component for any host, then we don't process any further.