Browse Source

AMBARI-4347 Capacity-scheduler properties loaded though they are not supported. (atkach)

atkach 11 years ago
parent
commit
78b63993b1
1 changed files with 8 additions and 2 deletions
  1. 8 2
      ambari-web/app/utils/config.js

+ 8 - 2
ambari-web/app/utils/config.js

@@ -704,8 +704,14 @@ App.config = Em.Object.create({
         item.isVisible = item.type !== 'global.xml';
         item.isVisible = item.type !== 'global.xml';
         var serviceName = item.service_name;
         var serviceName = item.service_name;
         var fileName = item.type;
         var fileName = item.type;
-        // If condition makes sure that mapred-queue-acls.xml configs are not shown in Mapreduce or Mapreduce2 service page Advanced section
-        if (fileName !== 'mapred-queue-acls.xml' || App.supports.capacitySchedulerUi === true) {
+        var isHDP2 = App.get('isHadoop2Stack');
+        /**
+         * Properties from mapred-queue-acls.xml are ignored unless App.supports.capacitySchedulerUi is true
+         * Properties from capacity-scheduler.xml are ignored unless HDP stack version is 2.x or
+         * HDP stack version is 1.x and App.supports.capacitySchedulerUi is true.
+          */
+        if ((fileName !== 'mapred-queue-acls.xml' || App.supports.capacitySchedulerUi) &&
+            (fileName !== 'capacity-scheduler.xml' || isHDP2 || App.supports.capacitySchedulerUi)) {
           properties.push({
           properties.push({
             serviceName: serviceName,
             serviceName: serviceName,
             name: item.property_name,
             name: item.property_name,