ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-8254. Pig client installation failed after upgrade (aonishuk)
Date Mon, 10 Nov 2014 16:39:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 f967daa34 -> 6242e88b3
  refs/heads/trunk ae0d82574 -> 596226d0b


AMBARI-8254. Pig client installation failed after upgrade (aonishuk)


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

Branch: refs/heads/trunk
Commit: 596226d0b88ed85eceeffcefa987ba0067552ee2
Parents: ae0d825
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Nov 10 18:39:10 2014 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Nov 10 18:39:10 2014 +0200

----------------------------------------------------------------------
 .../apache/ambari/server/upgrade/UpgradeCatalog170.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/596226d0/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index de34e6b..f6440b8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -1110,9 +1110,12 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
         Config oldConfig = cluster.getDesiredConfigByType(PIG_PROPERTIES_CONFIG_TYPE);
         if (oldConfig != null) {
           Map<String, String> properties = oldConfig.getProperties();
-          String value = properties.remove(PIG_CONTENT_FIELD_NAME);
-          properties.put(CONTENT_FIELD_NAME, value);
-          configHelper.createConfigType(cluster, ambariManagementController, PIG_PROPERTIES_CONFIG_TYPE,
properties, "ambari-upgrade");
+          
+          if(!properties.containsKey(CONTENT_FIELD_NAME)) {
+            String value = properties.remove(PIG_CONTENT_FIELD_NAME);
+            properties.put(CONTENT_FIELD_NAME, value);
+            configHelper.createConfigType(cluster, ambariManagementController, PIG_PROPERTIES_CONFIG_TYPE,
properties, "ambari-upgrade");
+          }
         }
       }
     }
@@ -1136,7 +1139,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
             CONTENT_FIELD_NAME, cluster.getClusterName());
 
         for(String configType:configTypes) {
-          if(!configType.endsWith(ENV_CONFIGS_POSTFIX)) {
+          if(!configType.endsWith(ENV_CONFIGS_POSTFIX) && !configType.equals("pig-properties"))
{
             continue;
           }
 


Mime
View raw message