ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-18315. Ambari server start should log the class path being used (aonishuk)
Date Fri, 09 Sep 2016 11:10:26 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0090e3ac4 -> c45b5497e


AMBARI-18315. Ambari server start should log the class path being used (aonishuk)


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

Branch: refs/heads/trunk
Commit: c45b5497e4c63f223e7b5aadf245bf57838f8b7c
Parents: 0090e3a
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Sep 9 14:10:10 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Sep 9 14:10:10 2016 +0300

----------------------------------------------------------------------
 .../ambari/server/controller/AmbariServer.java  | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c45b5497/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index d20b1d7..bae4ab6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -25,14 +25,17 @@ import java.net.Authenticator;
 import java.net.BindException;
 import java.net.PasswordAuthentication;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Map;
 import java.util.logging.LogManager;
 
 import javax.crypto.BadPaddingException;
 import javax.servlet.DispatcherType;
 
+import com.google.common.base.Joiner;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StateRecoveryManager;
 import org.apache.ambari.server.StaticallyInject;
@@ -919,7 +922,25 @@ public class AmbariServer {
     }
   }
 
+  /**
+   * Logs startup properties.
+   */
+  private static void logStartup() {
+    final String linePrefix = "STARTUP_MESSAGE: ";
+
+    final String classpathPropertyName = "java.class.path";
+    final String classpath = System.getProperty(classpathPropertyName);
+
+    String[] rawMessages = {
+      linePrefix + "Starting AmbariServer.java executable",
+      classpathPropertyName + " = " + classpath
+    };
+
+    LOG.info(Joiner.on("\n" + linePrefix).join(rawMessages));
+  }
+
   public static void main(String[] args) throws Exception {
+    logStartup();
     Injector injector = Guice.createInjector(new ControllerModule(), new AuditLoggerModule());
 
     AmbariServer server = null;


Mime
View raw message