You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/06/03 07:34:32 UTC

[jira] Created: (CASSANDRA-1154) basic, single node indexing against one indexexpression

basic, single node indexing against one indexexpression
-------------------------------------------------------

                 Key: CASSANDRA-1154
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
             Project: Cassandra
          Issue Type: Sub-task
          Components: Core
            Reporter: Jonathan Ellis
             Fix For: 0.7




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1154) basic, single node indexing against one indexexpression

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1154:
--------------------------------------

    Attachment: 1154-v2.txt

Added LocalByPartitionerType as mentioned above (although we can probably drop it after CASSANDRA-1249 simplifies partitioners).  Cleaned up the code and made index CFSs "private" -- they don't have a cfId and are not in the Table CFS map; they are only referenced by the "public" CF that they are indexing.

The only remaining TODOs in the patch reference subsequent subtasks.  This is ready for review.

> basic, single node indexing against one indexexpression
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>             Fix For: 0.7
>
>         Attachments: 1154-v2.txt, 1154.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1154) basic, single node indexing against one indexexpression

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874968#action_12874968 ] 

Jonathan Ellis commented on CASSANDRA-1154:
-------------------------------------------

the one part of this sub-task not dealt with in 1153 or a later sub-task is, here I create index CFs always with BytesType comparator.  This is correct for OPP (technically, BOP) but we need to support mirroring other key orderings, as column orderings.  In other words, just as LocalPartitioner uses the value ordering to store index rows on disk in the correct order (to support operators other than EQ later on), we need to create a PartitonerOrdered[Abstract]Type that orders columns w/in an index row (that is, columns whose name is a row key) by the same order those row keys are ordered on disk.  This allows the optimizations mentioned in CASSANDRA-1156.

> basic, single node indexing against one indexexpression
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>             Fix For: 0.7
>
>         Attachments: 1154.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1154) basic, single node indexing against one indexexpression

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1154:
--------------------------------------

    Attachment: 1154.txt

littered with TODOs but passes the test (again, this only works vs a single node)

for this task fixing the TODOs dealing with cfmetadata and CASSANDRA-1153 is adequate, other tasks flesh out the rest of this

> basic, single node indexing against one indexexpression
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>             Fix For: 0.7
>
>         Attachments: 1154.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1154) basic, single node indexing against one indexexpression

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886025#action_12886025 ] 

Matthew F. Dennis commented on CASSANDRA-1154:
----------------------------------------------

+1 but I would replace testIndexScan with:

{code}
@Test
public void testIndexScan() throws IOException
{
    RowMutation rm;

    rm = new RowMutation("Keyspace1", "k1".getBytes());
    rm.add(new QueryPath("Indexed1", null, "notbirthdate".getBytes("UTF8")), FBUtilities.toByteArray(1L), new TimestampClock(0));
    rm.add(new QueryPath("Indexed1", null, "birthdate".getBytes("UTF8")), FBUtilities.toByteArray(1L), new TimestampClock(0));
    rm.apply();

    rm = new RowMutation("Keyspace1", "k2".getBytes());
    rm.add(new QueryPath("Indexed1", null, "notbirthdate".getBytes("UTF8")), FBUtilities.toByteArray(2L), new TimestampClock(0));
    rm.add(new QueryPath("Indexed1", null, "birthdate".getBytes("UTF8")), FBUtilities.toByteArray(2L), new TimestampClock(0));
    rm.apply();

    rm = new RowMutation("Keyspace1", "k3".getBytes());
    rm.add(new QueryPath("Indexed1", null, "notbirthdate".getBytes("UTF8")), FBUtilities.toByteArray(1L), new TimestampClock(0));
    rm.add(new QueryPath("Indexed1", null, "birthdate".getBytes("UTF8")), FBUtilities.toByteArray(1L), new TimestampClock(0));
    rm.apply();

    IndexExpression expr = new IndexExpression("birthdate".getBytes("UTF8"), IndexOperator.EQ, FBUtilities.toByteArray(1L));
    IndexClause clause = new IndexClause(Arrays.asList(expr), 100);
    IFilter filter = new IdentityQueryFilter();
    List<Row> rows = Table.open("Keyspace1").getColumnFamilyStore("Indexed1").scan(clause, filter);

    assert rows != null;
    assert rows.size() == 2;
    assert Arrays.equals("k1".getBytes(), rows.get(0).key.key);
    assert Arrays.equals("k3".getBytes(), rows.get(1).key.key);
    assert Arrays.equals(FBUtilities.toByteArray(1L), rows.get(0).cf.getColumn("birthdate".getBytes("UTF8")).value());
    assert Arrays.equals(FBUtilities.toByteArray(1L), rows.get(1).cf.getColumn("birthdate".getBytes("UTF8")).value());
}
{code}


> basic, single node indexing against one indexexpression
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.7
>
>         Attachments: 1154-v2.txt, 1154.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1154) basic, single node indexing against one indexexpression

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888343#action_12888343 ] 

Hudson commented on CASSANDRA-1154:
-----------------------------------

Integrated in Cassandra #491 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/491/])
    

> basic, single node indexing against one indexexpression
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1154
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1154
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.7
>
>         Attachments: 1154-v2.txt, 1154.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.