ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-14852. Capacity Scheduler View - Provide dropdown for scheduling calculator. (Akhil PB via dipayanb)
Date Fri, 26 Feb 2016 07:35:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 2588ab393 -> 95ce453bd


AMBARI-14852. Capacity Scheduler View - Provide dropdown for scheduling calculator. (Akhil
PB via dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95ce453b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95ce453b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95ce453b

Branch: refs/heads/branch-2.2
Commit: 95ce453bd67588e41a17459cd48e4a9c913a8315
Parents: 2588ab3
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Fri Feb 26 13:04:55 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Fri Feb 26 13:04:55 2016 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/controllers/queues.js   | 14 +++++++++++++-
 .../src/main/resources/ui/app/styles/application.less |  4 ++++
 .../resources/ui/app/templates/schedulerPanel.hbs     | 10 ++++++++--
 3 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/95ce453b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
index 416ff43..4aeb442 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
@@ -416,5 +416,17 @@ App.QueuesController = Ember.ArrayController.extend({
     })
 
     return hasInvalidMapping;
-  }.property('scheduler.queue_mappings','content.length','content.@each.capacity')
+  }.property('scheduler.queue_mappings','content.length','content.@each.capacity'),
+
+  /**
+   * Resource calculator dropdown options
+   */
+  resourceCalculatorValues: [{
+    label: 'Default Resource Calculator',
+    value: 'org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator'
+  }, {
+    label: 'Dominant Resource Calculator',
+    value: 'org.apache.hadoop.yarn.util.resource.DominantResourceCalculator'
+  }]
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/95ce453b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
index 69fb96f..cd7de10 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
@@ -204,6 +204,10 @@
         }
       }
     }
+    .input-resource-calc {
+       width: 85%;
+       display: inline-block;
+    }
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/95ce453b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
index 4419aa0..22bff46 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
@@ -106,10 +106,16 @@
             {{tooltip-label
               label='Calculator'
               class="col-xs-5 control-label"
-              message='The method by which the scheduler calculates resource capacity across
resource types.'
+              message='The method by which the scheduler calculates resource capacity across
resource types. <br/> Default Resource Calculator allocates resources based on memory
alone. <br/> Dominant Resource Calculator allocates resources based on memory, cpu etc.'
             }}
             <div class="col-xs-7 control-value">
-              {{expandable-input value=scheduler.resource_calculator class="input-sm form-control
input-expand"}}
+              {{view Ember.Select
+                class="form-control input-sm input-resource-calc"
+                content=resourceCalculatorValues
+                optionLabelPath="content.label"
+                optionValuePath="content.value"
+                value=scheduler.resource_calculator
+              }}
               {{#if schedulerDirtyFilelds.resource_calculator}}
                 <div class="btn-group btn-group-xs" >
                     <a {{action 'rollbackProp' 'resource_calculator' scheduler}} href="#"
class="btn btn-default btn-warning"><i class="fa fa-undo"></i></a>


Mime
View raw message