You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Jenson (JIRA)" <ji...@apache.org> on 2007/07/16 01:42:04 UTC

[jira] Created: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
--------------------------------------------------------------------------------------------

                 Key: HADOOP-1615
                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
             Project: Hadoop
          Issue Type: Improvement
          Components: contrib/hbase
    Affects Versions: 0.13.0
            Reporter: Steve Jenson
            Priority: Trivial
             Fix For: 0.13.0


In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513095 ] 

Hadoop QA commented on HADOOP-1615:
-----------------------------------

-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12361913/patch.txt against trunk revision r556746.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/420/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/420/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Status: Patch Available  (was: Open)

Works in my environment. Get Hudson to agree

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Steve Jenson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513032 ] 

Steve Jenson commented on HADOOP-1615:
--------------------------------------

I'm happy to make the change in HRegionServer.

Do you want me to change the timeout value to be configurable?

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.13.0)
                   0.15.0
           Status: Resolved  (was: Patch Available)

Committed patch

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.15.0
>
>         Attachments: HADOOP-1615.patch, patch.txt, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Status: In Progress  (was: Patch Available)

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Steve Jenson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Jenson updated HADOOP-1615:
---------------------------------

    Status: Patch Available  (was: Open)

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Priority: Trivial
>             Fix For: 0.13.0
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Attachment: patch.txt

Updated to correspond to changes in trunk

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Steve Jenson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Jenson updated HADOOP-1615:
---------------------------------

    Attachment: HADOOP-1615.patch

There was no obvious place to add a patch in the 'Add Patch' workflow so I am uploading it here. Thanks.

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Attachment: patch.txt

Make similar change in HRegionServer.

Change timeout value.

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513010 ] 

Jim Kellerman commented on HADOOP-1615:
---------------------------------------

This also applies to HRegionServer

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Status: Patch Available  (was: In Progress)

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Assigned: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman reassigned HADOOP-1615:
-------------------------------------

    Assignee: Jim Kellerman

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Updated: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman updated HADOOP-1615:
----------------------------------

    Status: Open  (was: Patch Available)

Additional changes necessary

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513148 ] 

Hadoop QA commented on HADOOP-1615:
-----------------------------------

-1, build or testing failed

2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12361939/patch.txt against trunk revision r556754.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/425/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/425/console

Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Steve Jenson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513116 ] 

Steve Jenson commented on HADOOP-1615:
--------------------------------------

Thanks!

Also, before I sent this patch in, I tested it  several times with:

hbase org.apache.hadoop.hbase.PerformanceEvaluation sequentialWrite 1

and measured no performance degredation from a baseline copy I had checked out.


> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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


[jira] Commented: (HADOOP-1615) Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513049 ] 

Jim Kellerman commented on HADOOP-1615:
---------------------------------------

Steve,

Thanks for the offer. I already made the change and submitted the revised patch.

> Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1615
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.13.0
>            Reporter: Steve Jenson
>            Assignee: Jim Kellerman
>            Priority: Trivial
>             Fix For: 0.13.0
>
>         Attachments: HADOOP-1615.patch, patch.txt
>
>
> In HMaster, there is a msgQueue typed as an ArrayList<PendingOperations>. PendingOperations are added to the queue and notify() is called on msgQueue. I think using a BlockingQueue<PendingOperations> makes the intent of the code more clear and removes potentially problematic synchronization issues. BlockingQueues are thread-safe and allow multiple producers and consumers. I have written a patch for this and will attach it. 

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