Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/385#discussion_r24657012
  
    --- Diff: 
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
 ---
    @@ -530,54 +515,109 @@ Actor with ActorLogMessages with ActorLogging {
             log.error(t, "Could not properly unregister job {} form the 
library cache.", jobID)
         }
       }
    -
    -  private def checkJavaVersion(): Unit = {
    -    if (System.getProperty("java.version").substring(0, 3).toDouble < 1.7) 
{
    -      log.warning("Warning: Flink is running with Java 6. " +
    -        "Java 6 is not maintained any more by Oracle or the OpenJDK 
community. " +
    -        "Flink currently supports Java 6, but may not in future releases," 
+
    -        " due to the unavailability of bug fixes security patched.")
    -    }
    -  }
     }
     
     object JobManager {
    +  
       import ExecutionMode._
    +
       val LOG = LoggerFactory.getLogger(classOf[JobManager])
    +
       val FAILURE_RETURN_CODE = 1
    +
       val JOB_MANAGER_NAME = "jobmanager"
       val EVENT_COLLECTOR_NAME = "eventcollector"
       val ARCHIVE_NAME = "archive"
       val PROFILER_NAME = "profiler"
     
       def main(args: Array[String]): Unit = {
    +
    +    // startup checks and logging
         EnvironmentInformation.logEnvironmentInfo(LOG, "JobManager")
    -    val (configuration, executionMode, listeningAddress) = parseArgs(args)
    +    checkJavaVersion()
     
    -      if(SecurityUtils.isSecurityEnabled) {
    +    val (configuration: Configuration,
    +         executionMode: ExecutionMode,
    +         listeningAddress:  Option[(String, Int)]) =
    +    try {
    +      parseArgs(args)
    +    }
    +    catch {
    +      case t: Throwable => {
    +        LOG.error(t.getMessage(), t)
    +        System.exit(FAILURE_RETURN_CODE)
    +        null
    --- End diff --
    
    I'll leave it as it is. Looks simpler to me ;-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to