cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DOAN DuyHai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10661) Integrate SASI to Cassandra
Date Thu, 23 Jun 2016 07:50:16 GMT

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

DOAN DuyHai commented on CASSANDRA-10661:
-----------------------------------------

[~dbrosius] Can you expand further why {{someMapEntry.equals(someAbstractTrie)}} will always
be false ?

According to the contract of {{Map.Entry::equals}}, as long as the key and value are equal,
the equality holds.

I've tried an unit test and it works:

{code:java}
public class AbstractTrieTest
{
    
    @Test
    public void should_test_equality() throws Exception {
        Map<String, Long> map = new HashMap<>();
        map.put("10", 10L);

        final Map.Entry<String, Long> mapEntry = map.entrySet().iterator().next();

        final AbstractTrie.BasicEntry<String, Long> trieEntry = new AbstractPatriciaTrie.TrieEntry<>("10",
10L, 0);

        Assert.assertTrue("mapEntry.equals(trieEntry)", mapEntry.equals(trieEntry));
    }
}
{code}

{noformat}
% ant testsome -Dtest.name=org.apache.cassandra.index.sasi.utils.AbstractTrieTest -Dtest.methods=should_test_equality
                  
...
testsome:
    [junit] WARNING: multiple versions of ant detected in path for junit
    [junit]          jar:file:/usr/local/Cellar/ant/1.9.4/libexec/lib/ant.jar!/org/apache/tools/ant/Project.class
    [junit]      and jar:file:/Users/archinnovinfo/perso/cassandra/build/lib/jars/ant-1.9.4.jar!/org/apache/tools/ant/Project.class
    [junit] Testsuite: org.apache.cassandra.index.sasi.utils.AbstractTrieTest
    [junit] Testsuite: org.apache.cassandra.index.sasi.utils.AbstractTrieTest Tests run: 1,
Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.058 sec
{noformat}

> Integrate SASI to Cassandra
> ---------------------------
>
>                 Key: CASSANDRA-10661
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10661
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths
>            Reporter: Pavel Yaskevich
>            Assignee: Pavel Yaskevich
>              Labels: sasi
>             Fix For: 3.4
>
>
> We have recently released new secondary index engine (https://github.com/xedin/sasi)
build using SecondaryIndex API, there are still couple of things to work out regarding 3.x
since it's currently targeted on 2.0 released. I want to make this an umbrella issue to all
of the things related to integration of SASI, which are also tracked in [sasi_issues|https://github.com/xedin/sasi/issues],
into mainline Cassandra 3.x release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message