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

stack commented on HBASE-6698:
------------------------------

Sorry lads.  Distracted.

+1 on committing this patch.  It removes two fat delete and put methods and 
instead has us go by the batch mutate path.   Nice improvement.

Below are some comments.  You can address on commit Ram.

Why we do this?

{code}
-    Delete delete = new Delete();
+    Delete delete = new Delete(new byte[0]);
{code}

Null row in Delete is handled differently to a row that is an empty byte array 
(Would suggest HConstants.EMPTY_BYTE_ARRAY instead of creating a new byte array 
each time through).

Is this cast necessary?

{code}
+          doBatchMutate((Mutation)w, lid);  
{code}

This comment should be removed?  Its going to seem funny when its not followed 
by Put and Delete stuff:

{code}
           // Using default cluster id, as this can only happen in the
           // originating cluster. A slave cluster receives the result as a Put
           // or Delete
{code}

Here you put the square brackets after the variable name:

{code}
+    Pair<Mutation, Integer> mutateWithLocks[] = new Pair[1];
{code}

In the rest of the method, the square brackets precede the variable name.  
Would suggest you be consistent.


                
> Refactor checkAndPut and checkAndDelete to use doMiniBatchMutation
> ------------------------------------------------------------------
>
>                 Key: HBASE-6698
>                 URL: https://issues.apache.org/jira/browse/HBASE-6698
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: ramkrishna.s.vasudevan
>             Fix For: 0.96.0
>
>         Attachments: HBASE-6698_1.patch, HBASE-6698_2.patch, 
> HBASE-6698_3.patch, HBASE-6698_5.patch, HBASE-6698_6.patch, 
> HBASE-6698_6.patch, HBASE-6698_6.patch, HBASE-6698_6.patch, HBASE-6698.patch
>
>
> Currently the checkAndPut and checkAndDelete api internally calls the 
> internalPut and internalDelete.  May be we can just call doMiniBatchMutation
> only.  This will help in future like if we have some hooks and the CP
> handles certain cases in the doMiniBatchMutation the same can be done while
> doing a put thro checkAndPut or while doing a delete thro checkAndDelete.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to