ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-12611 Ambari upgrade to 2.1 fails (thinks hbase is installed) (dsen)
Date Fri, 31 Jul 2015 16:26:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 52ee2ffef -> ffc45f57a


AMBARI-12611 Ambari upgrade to 2.1 fails (thinks hbase is installed) (dsen)


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

Branch: refs/heads/trunk
Commit: ffc45f57a83006493f4c763cddd71e879e5bbe6b
Parents: 52ee2ff
Author: Dmytro Sen <dsen@apache.org>
Authored: Fri Jul 31 19:25:49 2015 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Fri Jul 31 19:25:49 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ambari/server/upgrade/UpgradeCatalog210.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ffc45f57/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index 3312145..e49a2f3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -1621,7 +1621,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
 
       if (clusterMap != null && !clusterMap.isEmpty()) {
         for (final Cluster cluster : clusterMap.values()) {
-          if (cluster.getDesiredConfigByType("hbase-site") != null) {
+          if (cluster.getDesiredConfigByType("hbase-site") != null && cluster.getDesiredConfigByType("hbase-env")
!= null) {
             Map<String, String> hbaseEnvProps = new HashMap<String, String>();
             Map<String, String> hbaseSiteProps = new HashMap<String, String>();
             Set<String> hbaseEnvRemoveProps = new HashSet<String>();
@@ -1660,7 +1660,10 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
 
             int threshold = 23;
             int totalMem = 0;
-            String hostName = cluster.getHosts("HBASE", "HBASE_MASTER").iterator().next();
+            String hostName = null;
+            if (cluster.getHosts("HBASE", "HBASE_MASTER").iterator().hasNext()) {
+              hostName = cluster.getHosts("HBASE", "HBASE_MASTER").iterator().next();
+            }
             for (Host host : cluster.getHosts()) {
               if(host.getHostName().equalsIgnoreCase(hostName)) {
                 totalMem = (int)(host.getTotalMemBytes() / (1024 * 1024));


Mime
View raw message