[
https://issues.apache.org/jira/browse/HDFS-7708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132552#comment-15132552
]
Allen Wittenauer commented on HDFS-7708:
----------------------------------------
Have we actually seen this happen in trunk or is this just more bad stuff in
branch-2?
At least in trunk (and maybe branch-2?), this code won't work. It needs to
know the name of the pid file which, at least today, is controlled by the shell
code.
bq. There balancer could be started as foreground process too hdfs balancer, if
shutdownhook added, that time also it tries to delete it, no harm though.
... except this looks like this is going to throw a pretty useless exception.
(and yes, people run balancer in the foreground all the time)
> Balancer should delete its pid file when it completes rebalance
> ---------------------------------------------------------------
>
> Key: HDFS-7708
> URL: https://issues.apache.org/jira/browse/HDFS-7708
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: balancer & mover
> Affects Versions: 2.6.0
> Reporter: Akira AJISAKA
> Assignee: Rakesh R
> Attachments: HDFS-7708-002.patch, HDFS-7708.patch
>
>
> When balancer completes rebalance and exits, it does not delete its pid file.
> Starting balancer again, then "kill -0 pid" to confirm the balancer process
> is not running.
> The problem is: If another process is running as the same pid as `cat
> pidfile`, balancer fails to start with following message:
> {code}
> balancer is running as process 3443. Stop it first.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)