[
https://issues.apache.org/jira/browse/HBASE-6109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284573#comment-13284573
]
Zhihong Yu commented on HBASE-6109:
-----------------------------------
It would be nice to have a test for NotifiableConcurrentSkipListMap.
{code}
+ public void waitListUpdate(long timeout) throws InterruptedException {
+ synchronized (internalList){
{code}
Since internalList is actually a Map, name the above method waitForUpdate() ?
{code}
+ public void clear() {
+ if (!internalList.isEmpty()) {
+ synchronized (internalList) {
{code}
Is it possible that internalList becomes empty after entering the synchronized
block ?
For Locker,
{code}
+ * An utility class to manage a set of lock. Each lock is identified by a
String who serves
{code}
the above should read 'A utility class to manage a set of locks. Each lock is
identified by a String which serves'
{code}
+public class Locker {
+ private static final Log LOG = LogFactory.getLog(AssignmentManager.class);
{code}
It should be Locker.class
{code}
+ private static final int NB_CONCURRENT_LOCK = 1000;
{code}
The constant should be named NB_CONCURRENT_LOCKS.
{code}
+ * Return a lock for the given key. The lock is already lockek.
{code}
The last word should be locked.
{code}
+ String message = "Can't release the lock for " + key;
{code}
It would be nice to add more about reason.
{code}
- synchronized (regionsInTransition) {
- nodes.removeAll(regionsInTransition.keySet());
- }
+ // no lock concurrent access ok: some threads may be adding/removing items
but its java-valid
+ nodes.removeAll(regionsInTransition.keySet());
{code}
Looking at batchRemove() of
http://www.docjar.com/html/api/java/util/ArrayList.java.html around line 669, I
don't see synchronization.
Meaning, existence check of elements from nodes in regionsInTransition.keySet()
may not be deterministic.
> Improve RIT performances during assignment on large clusters
> ------------------------------------------------------------
>
> Key: HBASE-6109
> URL: https://issues.apache.org/jira/browse/HBASE-6109
> Project: HBase
> Issue Type: Improvement
> Components: master
> Affects Versions: 0.96.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Attachments: 6109.v7.patch
>
>
> The main points in this patch are:
> - lowering the number of copy of the RIT list
> - lowering the number of synchronization
> - synchronizing on a region rather than on everything
> It also contains:
> - some fixes around the RIT notification: the list was sometimes modified
> without a corresponding 'notify'.
> - some tests flakiness correction, actually unrelated to this patch.
--
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