aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject incubator-aurora git commit: Adding check to see if java version is below 1.8
Date Fri, 20 Mar 2015 16:59:54 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 3cb8af1ef -> 9473549b9


Adding check to see if java version is below 1.8

Bugs closed: AURORA-1189

Reviewed at https://reviews.apache.org/r/32231/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/9473549b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/9473549b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/9473549b

Branch: refs/heads/master
Commit: 9473549b9e5526542cbb8d6d13bb54836ca17963
Parents: 3cb8af1
Author: Florian Pfeiffer <apachereviews@x8s.de>
Authored: Fri Mar 20 09:59:32 2015 -0700
Committer: Bill Farner <wfarner@apache.org>
Committed: Fri Mar 20 09:59:32 2015 -0700

----------------------------------------------------------------------
 .../aurora/scheduler/app/SchedulerMain.java       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/9473549b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
index 66fb432..2af009d 100644
--- a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
+++ b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java
@@ -15,6 +15,7 @@ package org.apache.aurora.scheduler.app;
 
 import java.net.InetSocketAddress;
 import java.util.List;
+import java.util.logging.Logger;
 
 import javax.inject.Inject;
 
@@ -67,6 +68,8 @@ import static com.twitter.common.logging.RootLogConfig.Configuration;
  */
 public class SchedulerMain extends AbstractApplication {
 
+  private static final Logger LOG = Logger.getLogger(SchedulerMain.class.getName());
+
   @NotNull
   @CmdLine(name = "cluster_name", help = "Name to identify the cluster being served.")
   private static final Arg<String> CLUSTER_NAME = Arg.create();
@@ -236,6 +239,21 @@ public class SchedulerMain extends AbstractApplication {
     logConfiguration.apply();
     Log4jConfigurator.configureConsole(logConfiguration);
 
+    String javaVersion = System.getProperty("java.version");
+    char javaVersionMinor = javaVersion.charAt(2);
+    if (javaVersionMinor < '8') {
+      LOG.warning(
+          "\n**************************************************************************\n"
+          + "*\n"
+          + "*\n"
+          + "*\tBeginning with Aurora 0.9.0, you'll need Java 1.8 to run aurora!\n"
+          + "*\tCurrently you're running \"" + javaVersion + "\"\n"
+          + "*\n"
+          + "*\n"
+          + "**************************************************************************"
+      );
+    }
+
     LeadershipListener leaderListener = schedulerLifecycle.prepare();
 
     Optional<InetSocketAddress> httpSocket =


Mime
View raw message