You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2021/11/08 22:39:00 UTC
[jira] [Updated] (FLINK-16574) StreamingFileSink should rename
files or fail if destination file already exists
[ https://issues.apache.org/jira/browse/FLINK-16574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-16574:
-----------------------------------
Labels: auto-deprioritized-major stale-minor (was: auto-deprioritized-major)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized.
> StreamingFileSink should rename files or fail if destination file already exists
> --------------------------------------------------------------------------------
>
> Key: FLINK-16574
> URL: https://issues.apache.org/jira/browse/FLINK-16574
> Project: Flink
> Issue Type: Bug
> Components: Connectors / FileSystem
> Affects Versions: 1.9.1
> Environment: We're using Flink 1.9.1 on YARN with Horton HDP 2.7.3.
> Reporter: static-max
> Priority: Minor
> Labels: auto-deprioritized-major, stale-minor
>
> I switched from BucketingSink to StreamingFileSink so my state could not be restored after starting from a savepoint.
> Upon start of the job there were already part-0-0 and part-0-1 files in the HDFS destination folder. The StreamingFileSink then creates a file like .part-0-0.inprogress.d1849354-39d4-4634-8fb3-dfb8e2083857{color:#172b4d}. When the file is rolled Flink tries to rename it to part-0-0, but that file already exists. NameNode logs "WARN hdfs.StateChange (FSDirRenameOp.java:unprotectedRenameTo(174)) - DIR* FSDirectory.unprotectedRenameTo: failed to rename XXXX to XXXXbeca
> use destination exists".{color}
> Flink does not care and creates a new file like .part-0-1.inprogress.d {color:#172b4d}for the next bucket and the game continues until the part index counter is so high the file can be renamed. But now I'm left with a lot of .part-xxx.inprogress.xxx that I need to rename by hand if I don't want to lose the data.{color}
>
> I would expect Flink to either fail if the file cannot be renamed, or auto-rename it to filename that does not exists yet.
> The same happens when not starting from a savepoint. IIRC the BucketingFileSink did not have this problem.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)