Ver Fonte

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

Jaimin Jetly há 11 anos atrás
pai
commit
5bc56f3642

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

@@ -624,6 +624,8 @@ module.exports =
       "id": "site property",
       "name": "storm.local.dir",
       "displayName": "storm.local.dir",
+      "defaultDirectory": "/hadoop/storm",
+      "displayType": "directory",
       "serviceName": "STORM",
       "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 'oozie_data_dir':
       case 'hbase.tmp.dir':
+      case 'storm.local.dir':
         this.unionAllMountPoints(isOnlyFirstOneNeeded, localDB);
         break;
     }
@@ -495,17 +496,18 @@ App.ServiceConfigProperty = Ember.Object.extend({
     });
     var temp = '';
     var setOfHostNames = [];
+    var components = [];
     switch (this.get('name')) {
       case 'dfs.namenode.name.dir':
       case 'dfs.name.dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'NAMENODE');
+        components = masterComponentHostsInDB.filterProperty('component', 'NAMENODE');
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
         }, this);
         break;
       case 'fs.checkpoint.dir':
       case 'dfs.namenode.checkpoint.dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'SECONDARY_NAMENODE');
+        components = masterComponentHostsInDB.filterProperty('component', 'SECONDARY_NAMENODE');
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
         }, this);
@@ -531,23 +533,33 @@ App.ServiceConfigProperty = Ember.Object.extend({
         }, this);
         break;
       case 'zk_data_dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER');
+        components = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER');
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
         }, this);
         break;
       case 'oozie_data_dir':
-        var components = masterComponentHostsInDB.filterProperty('component', 'OOZIE_SERVER');
+        components = masterComponentHostsInDB.filterProperty('component', 'OOZIE_SERVER');
         components.forEach(function (component) {
           setOfHostNames.push(component.hostName);
         }, this);
         break;
       case 'hbase.tmp.dir':
-        var temp = slaveComponentHostsInDB.findProperty('componentName', 'HBASE_REGIONSERVER');
+        temp = slaveComponentHostsInDB.findProperty('componentName', 'HBASE_REGIONSERVER');
         temp.hosts.forEach(function (host) {
           setOfHostNames.push(host.hostName);
         }, this);
         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.