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

Stephan Ewen commented on FLINK-2367:
-------------------------------------

I think this is simply the default Unix behavior. 

When you delete the file, you do not actually remove the file, but you change 
the directory to not contain the file any more. The file itself stays valid, 
although it is not accessible any more by anyone form the outside. Since the 
logger has already a handle to the file, it does not notice anything and goes 
on.

Unix and windows behave differently there, and I am not aware of a way to 
"forbid" Linux to delete the file, nor of a way that the logger could notice 
that (from the loggers point of view, nothing changed).

BTW: The logger rolls over to new files every day. If you want to make sure you 
do not loose too much log data in case someone deleted the log, you can set the 
logger  roll over every 30 minutes or so. On roll-over, it creates a new file 
and everything is good again.

> “flink-xx-jobmanager-linux-3lsu.log" file can't auto be recovered/detected 
> after mistaking delete
> -------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-2367
>                 URL: https://issues.apache.org/jira/browse/FLINK-2367
>             Project: Flink
>          Issue Type: Improvement
>          Components: JobManager
>    Affects Versions: 0.9
>         Environment: Linux
>            Reporter: chenliang
>            Priority: Minor
>              Labels: reliability
>             Fix For: 0.9.0
>
>
> For checking system whether be adequately reliability, testers usually 
> designedly do some delete operation.
> Steps:
> 1.go to "flink\build-target\log" 
> 2.delete “flink-xx-jobmanager-linux-3lsu.log" file 
> 3.Run jobs along with writing log info, meanwhile the system didn't give any 
> error info when the log info can't be wrote correctly.
> 4.when some jobs be run failed , go to check log file for finding the reason, 
> can't find the log file. 
> Must restart Job Manager to regenerate the log file, then continue to run 
> jobs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to