ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: Revert "AMBARI-17223. Ability to add "javax.jdo.option.ConnectionPassword" to hive clients from ambari.(vbrodetskyi)"
Date Thu, 16 Jun 2016 14:18:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 27e665c95 -> 447e3dffd


Revert "AMBARI-17223. Ability to add "javax.jdo.option.ConnectionPassword" to hive clients
from ambari.(vbrodetskyi)"

This reverts commit 27e665c95c138fc133d71b768e7bc595a9b2a411.


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

Branch: refs/heads/branch-2.4
Commit: 447e3dffd384abb2da49731ec8ec46828b1992d0
Parents: 27e665c
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Thu Jun 16 00:11:45 2016 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Thu Jun 16 00:11:45 2016 +0300

----------------------------------------------------------------------
 .../ambari/server/actionmanager/ActionScheduler.java     | 11 ++---------
 .../ambari/server/configuration/Configuration.java       |  2 --
 .../controller/AmbariManagementControllerImpl.java       | 10 +---------
 .../internal/ClientConfigResourceProvider.java           |  9 +--------
 4 files changed, 4 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/447e3dff/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index 4078500..33c0a1f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -328,19 +328,12 @@ class ActionScheduler implements Runnable {
         //Schedule what we have so far
 
         for (ExecutionCommand cmd : commandsToSchedule) {
-          boolean hidePassword = true;
-          Map<String, Map<String, String>> configurations = cmd.getConfigurations();
-          if(configurations != null && configurations.containsKey(Configuration.HIVE_ENV_CONFIG_TAG)){
-            if(configurations.get(Configuration.HIVE_ENV_CONFIG_TAG).containsKey(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY))
{
-              String hidePasswordStr = configurations.get(Configuration.HIVE_ENV_CONFIG_TAG).get(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY);
-              hidePassword = Boolean.parseBoolean(hidePasswordStr);
-            }
-          }
+
           // Hack - Remove passwords from configs
           if ((cmd.getRole().equals(Role.HIVE_CLIENT.toString()) ||
                   cmd.getRole().equals(Role.WEBHCAT_SERVER.toString()) ||
                   cmd.getRole().equals(Role.HCAT.toString())) &&
-                  cmd.getConfigurations().containsKey(Configuration.HIVE_CONFIG_TAG) &&
hidePassword) {
+                  cmd.getConfigurations().containsKey(Configuration.HIVE_CONFIG_TAG)) {
             cmd.getConfigurations().get(Configuration.HIVE_CONFIG_TAG).remove(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY);
           }
           processHostRole(stage, cmd, commandsToStart, commandsToUpdate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/447e3dff/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 29b678e..2b7fca0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -365,9 +365,7 @@ public class Configuration {
   public static final String MAPREDUCE2_LOG4J_CONFIG_TAG = "mapreduce2-log4j";
   public static final String RCA_ENABLED_PROPERTY = "rca_enabled";
   public static final String HIVE_CONFIG_TAG = "hive-site";
-  public static final String HIVE_ENV_CONFIG_TAG = "hive-env";
   public static final String HIVE_METASTORE_PASSWORD_PROPERTY = "javax.jdo.option.ConnectionPassword";
-  public static final String HIVE_ENV_HIDE_PASSWORD_PROPERTY = "javax.jdo.option.ConnectionPassword.hide";
   public static final String MASTER_KEY_PERSISTED = "security.master.key.ispersisted";
   public static final String MASTER_KEY_LOCATION = "security.master.key.location";
   public static final String MASTER_KEYSTORE_LOCATION = "security.master.keystore.location";

http://git-wip-us.apache.org/repos/asf/ambari/blob/447e3dff/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 68a315c..b5c6fc2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -2806,18 +2806,10 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     }
 
     // Hack - Remove passwords from configs
-    boolean hidePassword = true;
-    Map<String, Map<String, String>> configs = ec.getConfigurations();
-    if(configs.containsKey(Configuration.HIVE_ENV_CONFIG_TAG)){
-      if(configs.get(Configuration.HIVE_ENV_CONFIG_TAG).containsKey(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY))
{
-        String hidePasswordStr = configs.get(Configuration.HIVE_ENV_CONFIG_TAG).get(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY);
-        hidePassword = Boolean.parseBoolean(hidePasswordStr);
-      }
-    }
     if ((ec.getRole().equals(Role.HIVE_CLIENT.toString()) ||
             ec.getRole().equals(Role.WEBHCAT_SERVER.toString()) ||
             ec.getRole().equals(Role.HCAT.toString())) &&
-        ec.getConfigurations().containsKey(Configuration.HIVE_CONFIG_TAG) && hidePassword)
{
+        ec.getConfigurations().containsKey(Configuration.HIVE_CONFIG_TAG)) {
       ec.getConfigurations().get(Configuration.HIVE_CONFIG_TAG).remove(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/447e3dff/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 700e81f..9a86827 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -265,14 +265,7 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
       }
 
       // Hack - Remove passwords from configs
-      boolean hidePassword = true;
-      if(configurations.containsKey(Configuration.HIVE_ENV_CONFIG_TAG)){
-        if(configurations.get(Configuration.HIVE_ENV_CONFIG_TAG).containsKey(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY))
{
-          String hidePasswordStr = configurations.get(Configuration.HIVE_ENV_CONFIG_TAG).get(Configuration.HIVE_ENV_HIDE_PASSWORD_PROPERTY);
-          hidePassword = Boolean.parseBoolean(hidePasswordStr);
-        }
-      }
-      if (configurations.get(Configuration.HIVE_CONFIG_TAG)!=null && hidePassword)
{
+      if (configurations.get(Configuration.HIVE_CONFIG_TAG)!=null) {
         configurations.get(Configuration.HIVE_CONFIG_TAG).remove(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY);
       }
 


Mime
View raw message