[
https://issues.apache.org/jira/browse/HADOOP-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Todd Lipcon updated HADOOP-7788:
--------------------------------
Attachment: hadoop-7788.txt
New rev of the patch:
- fixed the shouldRun = false thing
- I moved the daemon to be an internal member of the class, because looking at
the code again I remembered this Java bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6609468 which can cause a
deadlock if you synchronize on a Thread object ever. Since this class uses
synchronization on itself, I think it's better to not be a Thread.
- added a new "FAILED" state as per one of the TODOs in the earlier patch. This
gets set if the daemon itself fails for any reason
- separated out the error handling of the case where we get an exception
talking to the monitored service, from the case where the callback itself
fails. In the case where the service is the one causing the exception, I am not
printing the full stack trace since it's a bit verbose and the message is
generally descriptive enough.
> HA: Simple HealthMonitor class to watch an HAService
> ----------------------------------------------------
>
> Key: HADOOP-7788
> URL: https://issues.apache.org/jira/browse/HADOOP-7788
> Project: Hadoop Common
> Issue Type: New Feature
> Components: ha
> Affects Versions: 0.24.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Attachments: hadoop-7788.txt, hadoop-7788.txt, hdfs-2524.txt
>
>
> This is a utility class which will be part of the FailoverController. The
> class starts a daemon thread which periodically monitors an HAService,
> calling its monitorHealth function. It then generates callbacks into another
> class when the health status changes (eg the RPC fails or the service returns
> a HealthCheckFailedException)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira