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

Keith Turner commented on GORA-66:
----------------------------------

Its not that Accumulo can not handle exclusive end keys.  Accumulo can handle 
inclusive or exclusive end keys, it does not care.  The problem is consistency 
of the gora API.  I think the Gora API should have a corresponding set of 
semantics that all data stores follow.  The test should enforce the semantics.  
It seems that the test are inconsistent when it comes to end keys.   

For example, take a look at testQueryWebPageKeyRange() in 
DataStoreTestUtil.java (rev 1510589).  Now consider the case where 
setStartKeys=true, setEndKeys=true, i=0, and j=0.  In this case I think 
expectedLength is set to ((0+1)-0), which implies the test expects inclusive 
start and inclusive end keys.  So why does testDeleteByQueryFields() expect an 
exclusive end key and testQueryWebPageKeyRange() expect an inclusive end key?  
Am I misreading the testQueryWebPageKeyRange() test?

If the HBase data store passes this test, is it doing inclusive end key for 
query and exclusive end key for delete?    I think the Accumulo data store does 
inclusive end key for query and delete.

I think query and delete should consistent in how they treat end keys.  I also 
think all data stores should be consistent in how they treat end keys.  
Otherwise Gora users will need to add complexity to their code inorder to 
handle this.  


  





                
> testDeleteByQueryFields seems incorrect
> ---------------------------------------
>
>                 Key: GORA-66
>                 URL: https://issues.apache.org/jira/browse/GORA-66
>             Project: Apache Gora
>          Issue Type: Bug
>    Affects Versions: 0.2
>            Reporter: Keith Turner
>             Fix For: 0.4
>
>         Attachments: GORA-66-1.patch
>
>
> While writing the Accumulo backend I have been trying to run some of the 
> existing test against it.  It seems that the test 
> DataStoreTestUtil.testDeleteByQueryFields() has two problems.
>  * The test does not flush the store after calling deleteByQuery().  This is 
> needed for accumulo since deletes are just inserts and must be flushed.
>  * The test expects the last key in a range that was deleted to be present.  
> As far as I can tell the end key in a query should be inclusive, but the test 
> treats as exclusive.
> I will submit a patch.

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