瀏覽代碼

AMBARI-10956. "Loading latest" log entry should include info about stack and version (dlysnichenko)

Lisnichenko Dmitro 10 年之前
父節點
當前提交
1cde5c70a7

+ 6 - 3
ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java

@@ -71,7 +71,8 @@ public class LatestRepoCallable implements Callable<Void> {
             LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
             null, null, null);
 
-        LOG.info("Loading latest URL info from " + sourceUri);
+        LOG.info("Loading latest URL info for stack " + stack.getName() + "-" +
+                stack.getVersion() + " from " + sourceUri);
         latestUrlMap = gson.fromJson(new InputStreamReader(
             streamProvider.readFrom(sourceUri)), type);
       } else {
@@ -83,12 +84,14 @@ public class LatestRepoCallable implements Callable<Void> {
         }
 
         if (jsonFile.exists()) {
-          LOG.info("Loading latest URL info from " + jsonFile);
+          LOG.info("Loading latest URL info for stack " + stack.getName() + "-" +
+                  stack.getVersion() + " from " + jsonFile);
           latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
         }
       }
     } catch (Exception e) {
-      LOG.error("Could not load the URI " + sourceUri + " (" + e.getMessage() + ")");
+      LOG.error("Could not load the URI for stack " + stack.getName() + "-" +
+              stack.getVersion() + " from " + sourceUri + " (" + e.getMessage() + ")");
       throw e;
     }