Draczech opened a new pull request #12560:
URL: https://github.com/apache/flink/pull/12560


   ## What is the purpose of the change
   After deleting (or moving) a file from location specified in 
`historyserver.archive.fs.dir` there are some files left in history server 
working directory.
   
   This problem was already addressed in 
https://github.com/apache/flink/pull/9759, but there are still [json files 
created](https://github.com/apache/flink/blob/master/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java#L237-L238)
 in `webDir/jobs/` left and never cleaned. With high number of jobs, those 
files can eventualy take quite some drive space.
   
   Current behaviour also allows for supposedly deleted job to be accessed over 
web UI `<HistoryServerURL>/#/job/<jobId>/overview`, though it is not listed in 
`Completed Jobs` list.
   
   ## Brief change log
   - updated how files are cleaned in `HistoryServerArchiveFetcher`
   
   ## Verifying this change
   - Extended existing tests with file existence check before and after it is 
deleted
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
     - Does this pull request introduce a new feature? no
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to