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

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

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

    https://github.com/apache/flink/pull/5346#discussion_r163495632
  
    --- Diff: 
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java
 ---
    @@ -365,6 +386,31 @@ public String call(String s) {
                }
        }
     
    +   public static List<Protos.Parameter> 
buildDockerParameters(Option<String> dockerParameters) {
    +           if (dockerParameters.isEmpty()) {
    +                   return Collections.emptyList();
    +           } else {
    +                   String[] dockerParameterSpecifications = 
dockerParameters.get().split(",");
    +
    +                   List<Protos.Parameter> parameters = new 
ArrayList<>(dockerParameterSpecifications.length);
    +
    +                   for (String dockerParameterSpecification : 
dockerParameterSpecifications) {
    +                           if 
(!dockerParameterSpecification.trim().isEmpty()) {
    +                                   String[] match = 
dockerParameterSpecification.split("=", 2);
    --- End diff --
    
    I would use split without the limit, i.e., .split("=")
    1. You already test for length below
    2. this way you would miss invalid specifications such as key2=val1=val3


> Allow custom docker parameters for docker tasks on Mesos
> --------------------------------------------------------
>
>                 Key: FLINK-8490
>                 URL: https://issues.apache.org/jira/browse/FLINK-8490
>             Project: Flink
>          Issue Type: Improvement
>          Components: Mesos
>            Reporter: Jörg Schad
>            Priority: Major
>
> It would be great to pass custom parameters to Mesos when using the Docker 
> Containerizer.
> This could be similar to this spark example: 
> `spark.mesos.executor.docker.parameters privileged=true`
>  
> Originally brought up here: 
> https://stackoverflow.com/questions/48393153/passing-custom-parameters-to-docker-when-running-flink-on-mesos-marathon?noredirect=1#comment83777480_48393153



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to