You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2017/11/15 22:13:20 UTC

ambari git commit: AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (vsubramanian)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 6e247b3f5 -> 822fe2d5a


AMBARI-22445. Warn the user appropriately for default MySQL server install for Hive (vsubramanian)


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

Branch: refs/heads/branch-2.6
Commit: 822fe2d5aa02c6d7f1fafdf74b5c0e23cf657bbc
Parents: 6e247b3
Author: Vivek Ratnavel Subramanian <vi...@gmail.com>
Authored: Wed Nov 15 14:11:28 2017 -0800
Committer: Vivek Ratnavel Subramanian <vi...@gmail.com>
Committed: Wed Nov 15 14:13:06 2017 -0800

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js       | 8 +++++++-
 ambari-web/test/views/common/controls_view_test.js | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/822fe2d5/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index f03e5c0..74c1e6e 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -519,6 +519,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId,
     if (['addServiceController', 'installerController'].contains(this.get('controller.wizardController.name')) && !App.StackService.find(this.get('serviceConfig.serviceName')).get('isInstalled')) {
       if (this.get('isNewDb') || this.get('dontUseHandleDbConnection').contains(this.get('serviceConfig.name'))) {
         this.onOptionsChange();
+        this.handleDBConnectionProperty();
       } else {
         if ((App.get('isHadoopWindowsStack') && this.get('inMSSQLWithIA')) || this.get('serviceConfig.name') === 'DB_FLAVOR') {
           this.onOptionsChange();
@@ -728,6 +729,11 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId,
       // check for all db types when installing Ranger - not only for existing ones
       checkDatabase = true;
     }
+    // Hive specific
+    if (this.get('serviceConfig.serviceName') === 'HIVE') {
+      // check for all db types when installing Hive - not only for existing ones
+      checkDatabase = true;
+    }
     if (propertyAppendTo1) {
       propertyAppendTo1.set('additionalView', null);
     }
@@ -737,7 +743,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId,
     var shouldAdditionalViewsBeSet = currentDB && checkDatabase && handledProperties.contains(this.get('serviceConfig.name')),
       driver = this.getDefaultPropertyValue('sql_jar_connector') ? this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 'driver.jar',
       dbType = this.getDefaultPropertyValue('db_type'),
-      additionalView1 = shouldAdditionalViewsBeSet ? App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
+      additionalView1 = shouldAdditionalViewsBeSet && !this.get('isNewDb') ? App.CheckDBConnectionView.extend({databaseName: dbType}) : null,
       additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({
         template: Ember.Handlebars.compile('<div class="alert">{{{view.message}}}</div>'),
         message: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/822fe2d5/ambari-web/test/views/common/controls_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/controls_view_test.js b/ambari-web/test/views/common/controls_view_test.js
index c5c5338..2d18396 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -59,7 +59,7 @@ describe('App.ServiceConfigRadioButtons', function () {
           propertyAppendTo1: 'javax.jdo.option.ConnectionURL',
           propertyAppendTo2: 'hive_database',
           isAdditionalView1Null: true,
-          isAdditionalView2Null: true,
+          isAdditionalView2Null: false,
           title: 'Hive, embedded database'
         },
         {