Skip to content

Commit

Permalink
HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM fi…
Browse files Browse the repository at this point in the history
…x zombie-detectors' handling of no processes -- was treating no processes as one possible zombie
  • Loading branch information
saintstack committed Nov 9, 2015
1 parent 7b80c80 commit 44367f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dev-support/zombie-detector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ find_processes () {
### Look for zombies
zombies () {
ZOMBIES=`find_processes`
# xargs trims white space before and after the count
ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"|wc -l|xargs`
if [[ -z ${ZOMBIES} ]]
then
ZOMBIE_TESTS_COUNT=0
else
ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"| wc -l| xargs`
fi
if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
wait=30
echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es) listed below; waiting ${wait}s to see if just slow to stop"
Expand Down

0 comments on commit 44367f5

Please sign in to comment.