You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/06/02 02:18:33 UTC

ambari git commit: AMBARI-11538. Ambari does not warn if hive tez container size exceeds yarn container max size - UI fix

Repository: ambari
Updated Branches:
  refs/heads/trunk 58286e01e -> 8cd80a1f4


AMBARI-11538. Ambari does not warn if hive tez container size exceeds yarn container max size - UI fix


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

Branch: refs/heads/trunk
Commit: 8cd80a1f48378be57f839eb0652496eefe47ef1e
Parents: 58286e0
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Mon Jun 1 17:18:09 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Mon Jun 1 17:18:09 2015 -0700

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.1/services/stack_advisor.py |  2 +-
 .../resources/stacks/HDP/2.2/services/stack_advisor.py |  2 +-
 .../app/mixins/common/configs/enhanced_configs.js      |  7 +++++--
 ambari-web/app/models/configs/stack_config_property.js |  5 +++++
 .../configs/stack_config_properties_mapper_test.js     | 13 ++++++++++++-
 5 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8cd80a1f/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py
index 4ccfad5..2c80263 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py
@@ -86,7 +86,7 @@ class HDP21StackAdvisor(HDP206StackAdvisor):
       yarnSchedulerMaximumAllocationMb = to_number(yarnSiteProperties["yarn.scheduler.maximum-allocation-mb"])
       hiveTezContainerSize = to_number(properties['hive.tez.container.size'])
       if hiveTezContainerSize is not None and yarnSchedulerMaximumAllocationMb is not None and hiveTezContainerSize > yarnSchedulerMaximumAllocationMb:
-        validationItems.append({"config-name": 'hive.tez.container.size', "item": self.getWarnItem("yarn.scheduler.maximum-allocation-mb is less than hive.tez.container.size")})
+        validationItems.append({"config-name": 'hive.tez.container.size', "item": self.getWarnItem("hive.tez.container.size is greater than the maximum container size specified in yarn.scheduler.maximum-allocation-mb")})
     return self.toConfigurationValidationProblems(validationItems, "hive-site")
 
   def validateTezConfigurations(self, properties, recommendedDefaults, configurations, services, hosts):

http://git-wip-us.apache.org/repos/asf/ambari/blob/8cd80a1f/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 2338b1d..b91ea9b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -525,7 +525,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
     hbase_coprocessor_region_classes = None
     if 'hbase.coprocessor.region.classes' in configurations["hbase-site"]["properties"]:
       hbase_coprocessor_region_classes = configurations["hbase-site"]["properties"]["hbase.coprocessor.region.classes"].strip()
-    elif 'hbase.coprocessor.region.classes' in services['configurations']["hbase-site"]["properties"]:
+    elif 'hbase-site' in services['configurations'] and 'hbase.coprocessor.region.classes' in services['configurations']["hbase-site"]["properties"]:
       hbase_coprocessor_region_classes = services['configurations']["hbase-site"]["properties"]["hbase.coprocessor.region.classes"].strip()
     if hbase_coprocessor_region_classes:
       coprocessorRegionClassList = hbase_coprocessor_region_classes.split(',')

http://git-wip-us.apache.org/repos/asf/ambari/blob/8cd80a1f/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index c25bb54..faefdd2 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -180,7 +180,9 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
    */
   setDependentServices: function(serviceName) {
     App.StackConfigProperty.find().forEach(function(stackProperty) {
-      if (stackProperty.get('serviceName') === serviceName && stackProperty.get('propertyDependedBy.length') > 0) {
+      if (stackProperty.get('serviceName') === serviceName &&
+        (stackProperty.get('propertyDependedBy.length') > 0 ||
+         stackProperty.get('propertyDependsOn.length') > 0)) {
         this._setDependentServicesAndFileNames(stackProperty, 'propertyDependedBy');
         this._setDependentServicesAndFileNames(stackProperty, 'propertyDependsOn');
       }
@@ -234,7 +236,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
    */
   removeCurrentFromDependentList: function (config, saveRecommended) {
     var current = this.get('_dependentConfigValues').find(function(dependentConfig) {
-      return Em.get(dependentConfig, 'propertyName') == config.get('name') && Em.get(dependentConfig, 'fileName') == App.config.getConfigTagFromFileName(config.get('filename'))
+      return Em.get(dependentConfig, 'propertyName') == config.get('name') && Em.get(dependentConfig, 'fileName') == App.config.getConfigTagFromFileName(config.get('filename'));
     });
     if (current) {
       Em.setProperties(current, {
@@ -375,6 +377,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
    * defines file names for configs and set them to <code>dependentFileNames<code> and
    * defines service names for configs and set them to <code>dependentServiceNames<code>
    * @param {App.StackConfigProperty} stackProperty
+   * @param {String} [key='propertyDependedBy'] - attribute to check dependent configs
    * @private
    */
   _setDependentServicesAndFileNames: function(stackProperty, key) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8cd80a1f/ambari-web/app/models/configs/stack_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/stack_config_property.js b/ambari-web/app/models/configs/stack_config_property.js
index 4f63b4b..7caeadf 100644
--- a/ambari-web/app/models/configs/stack_config_property.js
+++ b/ambari-web/app/models/configs/stack_config_property.js
@@ -113,6 +113,11 @@ App.StackConfigProperty = DS.Model.extend({
    */
   propertyDependedBy: DS.attr('array', {defaultValue: []}),
 
+  /**
+   * this property contains list of file type and name of properties
+   * which values depends on current property
+   * @property {object[]}
+   */
   propertyDependsOn: DS.attr('array', {defaultValue: []}),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/8cd80a1f/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js b/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
index 8fcb30e..fbe5a9b 100644
--- a/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
+++ b/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
@@ -52,6 +52,12 @@ describe('App.stackConfigPropertiesMapper', function () {
               "stack_name" : "HDP",
               "stack_version" : "2.2",
               "type" : "site1.xml",
+              "property_depends_on": [
+                {
+                  "name": "p5",
+                  "type": "site5"
+                }
+              ],
               "property_value_attributes": {
                 "type": "int",
                 "minimum": "512",
@@ -187,6 +193,12 @@ describe('App.stackConfigPropertiesMapper', function () {
           "name": "p4"
         }
       ]);
+      expect(App.StackConfigProperty.find('p1_site1').get('propertyDependsOn')).to.eql([
+        {
+          "type": "site5",
+          "name": "p5"
+        }
+      ]);
       expect(App.StackConfigProperty.find('p1_site1').get('valueAttributes')).to.eql({
         "type": "int",
         "minimum": "512",
@@ -207,4 +219,3 @@ describe('App.stackConfigPropertiesMapper', function () {
   });
 
 });
-