ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] git commit: AMBARI-8097. Upgrade to 1.7.0 shows exception in log related to WEBHCAT (aonishuk)
Date Sat, 01 Nov 2014 19:51:59 GMT
AMBARI-8097. Upgrade to 1.7.0 shows exception in log related to WEBHCAT (aonishuk)


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

Branch: refs/heads/branch-1.7.0
Commit: 3a2cd15d8c845d4bbd2a462650d79d5ed3bfcc8e
Parents: d2c5159
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Sat Nov 1 21:51:39 2014 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Sat Nov 1 21:51:39 2014 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/server/api/util/StackExtensionHelper.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2cd15d/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index 17faa18..781ea13 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -566,6 +566,11 @@ public class StackExtensionHelper {
           
           File alertsJson = new File(serviceFolder.getAbsolutePath() +
               File.separator + AmbariMetaInfo.SERVICE_ALERT_FILE_NAME);
+          
+          if (!metainfoFile.exists()) {
+            LOG.warn("Service folder " + serviceFolder.getAbsolutePath() + " doesn't contain
metainfo file. Ignoring it.");
+            continue;
+          }
 
           //Reading v2 service metainfo (may contain multiple services)
           // Get services from metadata


Mime
View raw message