You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Jim Kellerman (JIRA)" <ji...@apache.org> on 2008/10/25 00:49:44 UTC

[jira] Created: (HBASE-956) Master and region server threads should extend Chore

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.


[jira] Resolved: (HBASE-956) Master and region server threads should extend Chore

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (HBASE-956) Master and region server threads should extend Chore

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (HBASE-956) Master and region server threads should extend Chore

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
    [ 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.