You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/11/10 17:39:25 UTC

[2/2] ambari git commit: AMBARI-8254. Pig client installation failed after upgrade (aonishuk)

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/6242e88b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6242e88b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6242e88b

Branch: refs/heads/branch-1.7.0
Commit: 6242e88b35e62ce97d52dfd582ab4d169c3fe99c
Parents: f967daa
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Nov 10 18:39:12 2014 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Nov 10 18:39:12 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/6242e88b/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 e3422dd..5534dd6 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
@@ -1109,9 +1109,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");
+          }
         }
       }
     }
@@ -1135,7 +1138,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;
           }