[ 
https://issues.apache.org/jira/browse/FLINK-6630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133057#comment-16133057
 ] 

ASF GitHub Bot commented on FLINK-6630:
---------------------------------------

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

    https://github.com/apache/flink/pull/4555#discussion_r133975661
  
    --- Diff: 
flink-mesos/src/main/java/org/apache/flink/mesos/entrypoint/MesosTaskExecutorRunner.java
 ---
    @@ -0,0 +1,140 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.mesos.entrypoint;
    +
    +import org.apache.flink.configuration.AkkaOptions;
    +import org.apache.flink.configuration.ConfigConstants;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.configuration.GlobalConfiguration;
    +import org.apache.flink.core.fs.FileSystem;
    +import org.apache.flink.mesos.runtime.clusterframework.MesosConfigKeys;
    +import org.apache.flink.runtime.clusterframework.BootstrapTools;
    +import org.apache.flink.runtime.clusterframework.types.ResourceID;
    +import org.apache.flink.runtime.security.SecurityUtils;
    +import org.apache.flink.runtime.taskexecutor.TaskManagerRunner;
    +import org.apache.flink.runtime.util.EnvironmentInformation;
    +import org.apache.flink.runtime.util.JvmShutdownSafeguard;
    +import org.apache.flink.runtime.util.SignalHandler;
    +import org.apache.flink.util.Preconditions;
    +
    +import org.apache.commons.cli.CommandLine;
    +import org.apache.commons.cli.CommandLineParser;
    +import org.apache.commons.cli.Options;
    +import org.apache.commons.cli.PosixParser;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.util.Map;
    +import java.util.concurrent.Callable;
    +
    +/**
    + * The entry point for running a TaskManager in a Mesos container.
    + */
    +public class MesosTaskExecutorRunner {
    +
    +   private static final Logger LOG = 
LoggerFactory.getLogger(MesosTaskExecutorRunner.class);
    +
    +   private static final int INIT_ERROR_EXIT_CODE = 31;
    +
    +   private static final Options ALL_OPTIONS;
    +
    +   static {
    +           ALL_OPTIONS =
    +                   new Options()
    +                           
.addOption(BootstrapTools.newDynamicPropertiesOption());
    +   }
    +
    +   /** The process environment variables. */
    +   private static final Map<String, String> ENV = System.getenv();
    +
    +   public static void main(String[] args) throws Exception {
    +           EnvironmentInformation.logEnvironmentInfo(LOG, 
MesosTaskExecutorRunner.class.getSimpleName(), args);
    +           SignalHandler.register(LOG);
    +           JvmShutdownSafeguard.installAsShutdownHook(LOG);
    +
    +           // try to parse the command line arguments
    +           CommandLineParser parser = new PosixParser();
    +           CommandLine cmd = parser.parse(ALL_OPTIONS, args);
    +
    +           final Configuration configuration;
    +           try {
    +                   final Configuration dynamicProperties = 
BootstrapTools.parseDynamicProperties(cmd);
    +                   
GlobalConfiguration.setDynamicProperties(dynamicProperties);
    +                   LOG.debug("Mesos dynamic properties: {}", 
dynamicProperties);
    +
    +                   configuration = GlobalConfiguration.loadConfiguration();
    --- End diff --
    
    Here I think we could use `MesosEntrypointUtils#loadConfiguration(cmd)`.


> Implement FLIP-6 MesosAppMasterRunner
> -------------------------------------
>
>                 Key: FLINK-6630
>                 URL: https://issues.apache.org/jira/browse/FLINK-6630
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Mesos
>            Reporter: Eron Wright 
>            Assignee: Eron Wright 
>
> A new runner must be developed for the FLIP-6 RM.  Target the "single job" 
> scenario.
> Take some time to consider a general solution or a base implementation that 
> is shared with the old implementation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to