hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "binlijin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6458) new comparator twice in checkAndPut, just reuse the first one
Date Fri, 27 Jul 2012 01:29:34 GMT

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

binlijin commented on HBASE-6458:
---------------------------------

@stack, the trunk don't have the problem.
                
> new comparator twice in checkAndPut, just reuse the first one
> -------------------------------------------------------------
>
>                 Key: HBASE-6458
>                 URL: https://issues.apache.org/jira/browse/HBASE-6458
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.94.1
>            Reporter: binlijin
>             Fix For: 0.94.2
>
>         Attachments: HBASE-6458-0.94-2.patch, HBASE-6458-0.94.patch
>
>
>   public boolean checkAndPut(final byte[] regionName, final byte[] row,
>       final byte[] family, final byte[] qualifier, final byte[] value,
>       final Put put) throws IOException {
> 	       WritableByteArrayComparable comparator = new BinaryComparator(value);
> 		   boolean result = checkAndMutate(regionName, row, family, qualifier,
> 				CompareOp.EQUAL, new BinaryComparator(value), put,lock);
>   }
>   The comparator creates twice, because the comparator is not changed, so we can reuse
the comparator, the second is useless. 

--
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

        

Mime
View raw message