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

Apostolos Giannakidis commented on GORA-66:
-------------------------------------------

So, I had an idea about this and I would really like your opinion.

So, the problem, as far as I have understood it, is that different datastores 
treat differently the end key. For example, HBase treats the end key as 
exclusive. Accumulo treats it as inclusive. The test case 
DataStoreTestUtil.testDeleteByQueryFields() treats the end key as exclusive. 
So, it fails for any other datastore that treats the end key as inclusive, such 
as Accumulo.

If the above understanding of the issue is correct, then I suggest creating a 
property in the gora.properties file that will indicate how to treat the end 
key. Based on the value of this property the test case can do the appropriate 
check. For example, the property can be named gora.datastore.endkey. So, in the 
case the gora.properties of HBase datastore there will be an entry such as 
gora.datastore.endkey=exclusive. In Accumulo there will be an entry such as 
gora.datastore.endkey=inclusive. Finally, the test case 
testDeleteByQueryFields() will check whether this property has the value 
inclusive or exclusive and do the appropriate check.

What do you think about 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