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

Zhihong Yu commented on HBASE-6109:
-----------------------------------

Rename TestLocker class to TestKeyLocker ?
{code}
+    // It has no reason to be a lock shares with the other operations.
{code}
'shares with' -> 'shared with'

Indentation in AssignmentManager.addToRITandCallClose() was off. It would be 
nice to correct the existing lines.
{code}
+    // No lock concurrency: adding a share synchronized here would not prevent 
to have two
+    //  entries as we don't check if the region is already there. This must be 
ensured by the
+    //  method callers. todo nli: check
{code}
'share synchronized' -> 'synchronized'. Remove the 'todo nli:' at the end.
{code}
-    Map<String, RegionPlan> plans=new HashMap<String, RegionPlan>();
+    Map<String, RegionPlan> plans=new HashMap<String, 
RegionPlan>(regions.size());
{code}
Insert spaces around = sign.
{code}
+   * @return True if none of the regions in the set are in transition
{code}
'are in' -> 'is in'
{code}
+  public NavigableMap<K, V> copyMap() {
+    return delegatee.clone();
{code}
Why not call the method clone() ?
{code}
+  public void clear() {
+    if (!delegatee.isEmpty()) {
+      synchronized (delegatee) {
{code}
Suppose delegatee is empty upon entry to the above method, what if an entry is 
added after the isEmpty() check ?
                
> 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
>             Fix For: 0.96.0
>
>         Attachments: 6109.v19.patch, 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

        

Reply via email to