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

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

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

    https://github.com/apache/flink/pull/6284#discussion_r202087570
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
 ---
    @@ -250,6 +250,10 @@ public static Configuration 
generateTaskManagerConfiguration(
                        cfg.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 
numSlots);
                }
     
    +           if (!baseConfig.containsKey(CoreOptions.TMP_DIRS_OVERRIDDEN)){
    +                   cfg.setString(CoreOptions.TMP_DIRS, "");        // 
HACK: emulate removal for the given key
    +           }
    --- End diff --
    
    I would suggest to add a 
`BootstratpTools#cloneConfiguration(Configuration)` method which clones the 
given `Configuration` and resets all node specific fields. One of these fields 
is `CoreOptions#TMP_DIRS`. This means if `USE_LOCAL_DEFAULT_TMP_DIRS` is true, 
then we clear the `TMP_DIRS` option. We actually need for that a 
`Configuration#clear(ConfigOption)` method which removes the option entry from 
`Configuration#confData`. Otherwise we might risk that we don't use the 
TMP_DIRS default value but instead `""` if there are no local default tmp dirs.


> CoreOptions.TMP_DIRS wrongly managed on Yarn
> --------------------------------------------
>
>                 Key: FLINK-9762
>                 URL: https://issues.apache.org/jira/browse/FLINK-9762
>             Project: Flink
>          Issue Type: Bug
>          Components: YARN
>    Affects Versions: 1.5.0
>            Reporter: Oleksandr Nitavskyi
>            Assignee: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.5.2, 1.6.0
>
>
> The issue on Yarn is that it is impossible to have different LOCAL_DIRS on 
> JobManager and TaskManager, despite LOCAL_DIRS value depends on the container.
> The issue is that CoreOptions.TMP_DIRS is configured to the default value 
> during JobManager initialization and added to the configuration object. When 
> TaskManager is launched the appropriate configuration object is cloned with 
> LOCAL_DIRS which makes sense only for Job Manager container. When YARN 
> container with TaskManager from his point of view CoreOptions.TMP_DIRS is 
> always equal either to path in flink.yml or to the or to the LOCAL_DIRS of 
> Job Manager (default behaviour). Is TaskManager’s container do not have an 
> access to another folders, that folders allocated by YARN TaskManager cannot 
> be started.



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

Reply via email to