You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by is...@apache.org on 2018/08/10 18:19:32 UTC

[ambari] 02/06: AMBARI-24246. Ambari does not pick the existing hive database from the jdbc url set

This is an automated email from the ASF dual-hosted git repository.

ishanbha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 704342f10da431b783164f74a99c7e2dd34cf398
Author: hiveww <hi...@gmail.com>
AuthorDate: Thu Jul 12 13:49:18 2018 +0300

    AMBARI-24246. Ambari does not pick the existing hive database from the jdbc url set
---
 .../app/mixins/common/configs/config_recommendation_parser.js    | 9 ++++++---
 ambari-web/app/views/common/controls_view.js                     | 8 --------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/ambari-web/app/mixins/common/configs/config_recommendation_parser.js b/ambari-web/app/mixins/common/configs/config_recommendation_parser.js
index fcaf6f0..4d88c00 100644
--- a/ambari-web/app/mixins/common/configs/config_recommendation_parser.js
+++ b/ambari-web/app/mixins/common/configs/config_recommendation_parser.js
@@ -55,7 +55,6 @@ App.ConfigRecommendationParser = Em.Mixin.create(App.ConfigRecommendations, {
     App.assertFunction(updateCallback);
     App.assertFunction(removeCallback);
     App.assertFunction(updateBoundariesCallback);
-
     var propertiesToDelete = [];
     configs.forEach(function (config) {
       var name = Em.get(config, 'name'),
@@ -158,9 +157,10 @@ App.ConfigRecommendationParser = Em.Mixin.create(App.ConfigRecommendations, {
     var name = Em.get(config, 'name'),
         fileName = Em.get(config, 'filename'),
         group = Em.get(config, 'group.name'),
-        value = Em.get(config, 'value');
-
+        value = Em.get(config, 'value'),
+        prevRecommeneded = config.get('recommendedValue');
     Em.set(config, 'recommendedValue', recommendedValue);
+    console.log('test123', config, recommendedValue)
     if (this.allowUpdateProperty(parentProperties, name, fileName, group, value)) {
       var allowConfigUpdate = true;
       // workaround for capacity-scheduler
@@ -170,6 +170,9 @@ App.ConfigRecommendationParser = Em.Mixin.create(App.ConfigRecommendations, {
           allowConfigUpdate = false;
         }
       }
+      if (prevRecommeneded !== config.get('value')) {
+        allowConfigUpdate = false;
+      }
       if (allowConfigUpdate) {
         Em.setProperties(config, {
           value: recommendedValue,
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index b41026b..2c3c4d8 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -113,14 +113,6 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
          }]);
       }
     }
-
-    //Fix required by QA (Ambari does not pick the existing hive database from the jdbc url set)
-    if (['oozie.service.JPAService.jdbc.url__oozie-site', 'javax.jdo.option.ConnectionURL__hive-site'].contains(config.get('id'))) {
-      controller.set('recommendationsInProgress', true);
-      controller.runServerSideValidation().done(function () {
-        controller.set('recommendationsInProgress', false)
-      });
-    }
     return $.Deferred().resolve().promise();
   },