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

Stefan Richter commented on FLINK-10954:
----------------------------------------

I agree with [~StephanEwen] that we should work with hardlink for the RocksDB 
local state. We were choosing the temp dir mostly to support eventual cleanup 
in non-container environments and the local state dir structur in general has a 
layout to support cleanups. I see that this case is a bit tricky and I think it 
can become more tricky if we consider that we support multiple instance 
directories for RocksDB. Each instance directory could be on a different 
physical device and that means we would also require to have a local state 
directory co-located per physical device to work with the hardlinks. While we 
could enhance the local state store to supply particular local state 
directories on request, I wonder what the best way could be to ensure i) that 
there is a corresponding local dir for each physical device that holds instance 
dirs and ii) the best way to establish a connection between the two so that we 
can request the right directories.

> Hardlink from files of previous local stored state might cross devices
> ----------------------------------------------------------------------
>
>                 Key: FLINK-10954
>                 URL: https://issues.apache.org/jira/browse/FLINK-10954
>             Project: Flink
>          Issue Type: Bug
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.6.2
>            Reporter: Yun Tang
>            Assignee: Yun Tang
>            Priority: Major
>             Fix For: 1.6.3, 1.8.0, 1.7.1
>
>
> Currently, local recovery's base directories is initialized from 
> '{{io.tmp.dirs}}' if parameter '{{taskmanager.state.local.root-dirs}}' is not 
> set. For Yarn environment, the tmp dirs is replaced by its '{{LOCAL_DIRS}}', 
> which might consist of directories from different devices, such as 
> /dump/1/nm-local-dir, /dump/2/nm-local-dir. The local directory for RocksDB 
> is initialized from IOManager's spillingDirectories, which might located in 
> different device from local recovery's folder. However, hard-link between 
> different devices is not allowed, it will throw exception below:
> {code:java}
> java.nio.file.FileSystemException: target -> souce: Invalid cross-device link
> {code}



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

Reply via email to