ソースを参照

AMBARI-8129. UI: Change dfs.namenode.safemode.threshold-pct value if HA enabled.(xiwang)

Xi Wang 10 年 前
コミット
3c887415d3
2 ファイル変更15 行追加3 行削除
  1. 12 0
      ambari-web/app/data/HDP2/ha_properties.js
  2. 3 3
      ambari-web/app/utils/config.js

+ 12 - 0
ambari-web/app/data/HDP2/ha_properties.js

@@ -211,6 +211,18 @@ module.exports =
         "filename": "hdfs-site",
         "serviceName": 'MISC'
       },
+      {
+        "id": "site property",
+        "name": "dfs.namenode.safemode.threshold-pct",
+        "displayName": "dfs.namenode.safemode.threshold-pct",
+        "description": "Specifies the percentage of blocks that should satisfy\n        the minimal replication requirement defined by dfs.namenode.replication.min.\n        Values less than or equal to 0 mean not to start in safe mode.\n        Values greater than 1 will make safe mode permanent.\n ",
+        "isReconfigurable": false,
+        "defaultValue": "0.99f",
+        "value": "0.99f",
+        "category": "HDFS",
+        "filename": "hdfs-site",
+        "serviceName": 'MISC'
+      },
       {
         "id": "site property",
         "name": "hbase.rootdir",

+ 3 - 3
ambari-web/app/utils/config.js

@@ -303,13 +303,13 @@ App.config = Em.Object.create({
    *   configs,
    *   mappingConfigs
    *
-   * @param configGroups
+   * @param configCategories
    * @param advancedConfigs
    * @param tags
    * @param serviceName
    * @return {object}
    */
-  mergePreDefinedWithLoaded: function (configGroups, advancedConfigs, tags, serviceName) {
+  mergePreDefinedWithLoaded: function (configCategories, advancedConfigs, tags, serviceName) {
     var configs = [];
     var contentProperties = this.createContentProperties(advancedConfigs);
     var preDefinedConfigs = this.get('preDefinedSiteProperties').concat(contentProperties);
@@ -319,7 +319,7 @@ App.config = Em.Object.create({
     tags.forEach(function (_tag) {
       var isAdvanced = null;
       var filename = (filenameExceptions.contains(_tag.siteName)) ? _tag.siteName : _tag.siteName + ".xml";
-      var siteConfig = configGroups.filter(function (serviceConfigProperties) {
+      var siteConfig = configCategories.filter(function (serviceConfigProperties) {
         return _tag.tagName === serviceConfigProperties.tag && _tag.siteName === serviceConfigProperties.type;
       });
       siteConfig = siteConfig[0] || {};