[ 
https://issues.apache.org/jira/browse/HBASE-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643061#action_12643061
 ] 

Jim Kellerman commented on HBASE-956:
-------------------------------------

Chore is a task performed on a period in hbase.  The chore is run in its own 
thread. This base abstract class provides while loop and sleeping facility. If 
an unhandled exception, the threads exit is logged. Implementers just need to 
add checking if there is work to be done and if so, do it.  It's the base of 
several of the chore threads in hbase.

Don't subclass Chore if the task relies on being woken up for something to do, 
such as an entry being added to a queue, etc.

The following classes are not Chores, because rather than repeating the same 
task over and over after a nap, they wait for a wake-up because there is 
something to do:

Leases, HMaster, CompactSplitThread, LogRoller, MemcacheFlusher.

BaseScanner (and subclasses),  and LogFlusher are Chores.


> Master and region server threads should extend Chore
> ----------------------------------------------------
>
>                 Key: HBASE-956
>                 URL: https://issues.apache.org/jira/browse/HBASE-956
>             Project: Hadoop HBase
>          Issue Type: Sub-task
>          Components: master, regionserver
>    Affects Versions: 0.19.0
>            Reporter: Jim Kellerman
>            Assignee: Jim Kellerman
>            Priority: Minor
>             Fix For: 0.19.0
>
>
> A number of threads in both HMaster and HRegionServer extend Thread and not 
> Chore. Why?
> If we added Chore.interrupt (equivalent to many of the threads 
> interruptPolitely), there seems no reason to extend Chore rather than Thread.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to