Support Questions
Find answers, ask questions, and share your expertise

What happens to logs if there is no space on partition containing /var/log/hadoop-yarn/container

New Contributor

What we get are alerts, but is it possible to control logs deletion when disk is full?

,

What happens to logs if there is no space on partition containing /var/log/hadoop-yarn/container

what we get are alerts, but is it possible to control logs deletion when disk is full?

1 REPLY 1

Re: What happens to logs if there is no space on partition containing /var/log/hadoop-yarn/container

Super Guru
@ali rustam

Ideally you should not run into this situation, specially never in production. If this is production, my first recommendation would be to increase the allocated space to /var/log.

Now, to your question, no there is automatic deletion. However you can write a script and run a cron job every minute to check for capacity and delete old log files when threshold reaches some minimum. That will prevent this situation.

Finally, to avoid this situation and have this "automatically" taken care of change the settings for log retention. May be retain logs for only one or two weeks opposed to what you may have now. I would also very highly recommend going over the following article to see how you can control the size of your log files.

https://community.hortonworks.com/articles/8882/how-to-control-size-of-log-files-for-various-hdp-c.h...