[
https://issues.apache.org/jira/browse/HADOOP-6606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839972#action_12839972
]
Chad Metcalf commented on HADOOP-6606:
--------------------------------------
bq. If this was wikipedia, I'd add a "citation needed" flag.
There is a number of reasons why you don't put pids in /tmp. Example: tmpwatch
reaping the pids for long running processes. RHEL's /etc/cron.daily/tmpwatch
defaults to removing anything 10 days old
bq. What happens if hadoop-env.sh sets the pid dir, do we honor that?
We do. +HADOOP_PID_DIR="${HADOOP_PID_DIR:-$HADOOP_HOME/pids}"
bq. Why not use the logs dir rather than introduce another dir?
You are free to do so by setting a HADOOP_PID_DIR. Generally speaking pids are
not kept with logs. Example: most distros file system policies want logs in
/var/log and pids in /var/run. From
http://tldp.org/LDP/Linux-Filesystem-Hierarchy
{noformat}
/var/run
Contains the process identification files (PIDs) of system services and other
information about the system that is valid until the system is next booted. For
example, /var/run/utmp contains information about users currently logged in.
{noformat}
{noformat}
/var/log
Log files from the system and various programs/services, especially login
(/var/log/wtmp, which logs all logins and logouts into the system) and syslog
(/var/log/messages, where all kernel and system program message are usually
stored). Files in /var/log can often grow indefinitely, and may require
cleaning at regular intervals. Something that is now normally managed via log
rotation utilities such as 'logrotate'. This utility also allows for the
automatic rotation compression, removal and mailing of log files. Logrotate can
be set to handle a log file daily, weekly, monthly or when the log file gets to
a certain size. Normally, logrotate runs as a daily cron job. This is a good
place to start troubleshooting general technical problems.
{noformat}
> Change the default HADOOP_PID_DIR to $HADOOP_HOME/pids
> ------------------------------------------------------
>
> Key: HADOOP-6606
> URL: https://issues.apache.org/jira/browse/HADOOP-6606
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 0.20.2
> Reporter: Chad Metcalf
> Assignee: Chad Metcalf
> Attachments: HADOOP-6606.patch
>
>
> /tmp should not be used as a pid directory. There is too high a likelihood
> that pid files could be altered or deleted. A more reasonable default is
> $HADOOP_HOME/pids.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.