You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Philip Thompson (JIRA)" <ji...@apache.org> on 2015/03/18 23:04:38 UTC

[jira] [Commented] (CASSANDRA-8845) sorted CQLSSTableWriter accept unsorted clustering keys

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

Philip Thompson commented on CASSANDRA-8845:
--------------------------------------------

It's unclear to me what the bug is here. It seems that you're saying it accepts rows in the wrong order, but then does write them in the correct order? Is that not the desired behavior?

> sorted CQLSSTableWriter accept unsorted clustering keys
> -------------------------------------------------------
>
>                 Key: CASSANDRA-8845
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8845
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Pierre N.
>             Fix For: 2.1.4
>
>         Attachments: TestSorted.java
>
>
> The javadoc says : 
> {quote}
> The SSTable sorted order means that rows are added such that their partition key respect the partitioner order and for a given partition, that *the rows respect the clustering columns order*.
>         public Builder sorted()
> {quote}
> It throw an ex when partition key are in incorrect order, however, it doesn't throw an ex when rows are inserted with incorrect clustering keys order. It buffer them and sort them in correct order.
> {code}
>             writer.addRow(1, 3);
>             writer.addRow(1, 1);
>             writer.addRow(1, 2);
> {code}
> {code}
> $ sstable2json sorted/ks/t1/ks-t1-ka-1-Data.db 
> [
> {"key": "1",
>  "cells": [["\u0000\u0000\u0000\u0001:","",1424524149557000],
>            ["\u0000\u0000\u0000\u0002:","",1424524149557000],
>            ["\u0000\u0000\u0000\u0003:","",1424524149550000]]}
> ]
> {code}



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