Prechádzať zdrojové kódy

AMBARI-9369 : Enable Namenode HA wizard on Windows by default recommends dfs.journalnode.edits.dir as /hadoop/hdfs/journal (jluniya)

Jayush Luniya 10 rokov pred
rodič
commit
640a283aef

+ 1 - 0
ambari-server/src/main/python/ambari_server_main.py

@@ -150,6 +150,7 @@ def get_ulimit_open_files(properties):
 
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def generate_child_process_param_list(ambari_user, current_user, java_exe, class_path, debug_start, suspend_mode):
+  conf_dir = class_path
   if class_path.find(' ') != -1:
     conf_dir = '"' + class_path + '"'
   command_base = SERVER_START_CMD_DEBUG_WINDOWS if debug_start else SERVER_START_CMD_WINDOWS

+ 6 - 0
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hdfs-site.xml

@@ -79,4 +79,10 @@
     <name>dfs.domain.socket.path</name>
     <deleted>true</deleted>
   </property>
+  <property>
+    <name>dfs.journalnode.edits.dir</name>
+    <value>c:\hadoop\hdfs\journalnode</value>
+    <description>The path where the JournalNode daemon will store its local state. </description>
+  </property>
+
 </configuration>

+ 0 - 6
ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/HDFS/configuration/hdfs-site.xml

@@ -28,10 +28,4 @@
     <description></description>
   </property>
 
-  <property>
-    <name>dfs.journalnode.edits.dir</name>
-    <value>/hadoop/hdfs/journalnode</value>
-    <description>The path where the JournalNode daemon will store its local state. </description>
-  </property>
-
 </configuration>

+ 5 - 0
ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js

@@ -127,6 +127,11 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
      var value = this.get('serverConfigData.items').findProperty('type', 'hbase-site').properties['hbase.rootdir'].replace(/\/\/[^\/]*/, '//' + nameServiceId);
      this.setConfigInitialValue(config,value);
     }
+    config = configs.findProperty('name','dfs.journalnode.edits.dir');
+    if (App.get('isHadoopWindowsStack') && App.Service.find().someProperty('serviceName', 'HDFS')) {
+     var value = this.get('serverConfigData.items').findProperty('type', 'hdfs-site').properties['dfs.journalnode.edits.dir'];
+     this.setConfigInitialValue(config, value);
+    }
   },
 
   setConfigInitialValue: function(config,value) {

+ 7 - 5
ambari-web/app/utils/config.js

@@ -917,11 +917,13 @@ App.config = Em.Object.create({
 
   loadAdvancedConfigPartialSuccess: function(data, opt, params, request) {
     var properties = [];
-    var configurations = data.items.mapProperty('configurations').reduce(function(p,c) { return p.concat(c); });
-    configurations.forEach(function(item) {
-      var property = this.createAdvancedPropertyObject(item.StackConfigurations);
-      if (property) properties.push(property);
-    }, this);
+    if(data.items.length && data.items.mapProperty('configurations').length) {
+      var configurations = data.items.mapProperty('configurations').reduce(function(p,c) { return p.concat(c); });
+      configurations.forEach(function(item) {
+        var property = this.createAdvancedPropertyObject(item.StackConfigurations);
+        if (property) properties.push(property);
+      }, this);
+    }
     params.callback(properties, request);
   },