FAQ
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: Improvement
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.

Search Discussions

  • Jim Kellerman (JIRA) at Oct 27, 2008 at 6:43 pm
    [ https://issues.apache.org/jira/browse/HBASE-956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jim Kellerman updated HBASE-956:
    --------------------------------

    Issue Type: Sub-task (was: Improvement)
    Parent: HBASE-728
    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.
  • Jim Kellerman (JIRA) at Oct 27, 2008 at 9:12 pm
    [ 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.
  • Jim Kellerman (JIRA) at Oct 27, 2008 at 9:34 pm
    [ https://issues.apache.org/jira/browse/HBASE-956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Jim Kellerman resolved HBASE-956.
    ---------------------------------

    Resolution: Fixed

    Committed.

    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedOct 24, '08 at 10:50p
activeOct 27, '08 at 9:34p
posts4
users1
websitehbase.apache.org

1 user in discussion

Jim Kellerman (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase