SSTableSimpleUnsortedWriter和列族比较器

时间:2013-08-13 20:07:57

标签: cassandra

尝试使用sstableloader,对于使用cql创建的CF,如下所示:

CREATE TABLE test (
    a text,
    b text,
    c text,
    d int,
    e set<text>,
    f text,
    PRIMARY KEY ((a, b) c, d))

如何在SSTableSimpleUnsortedWriter中定义列族比较器?或者更具体地说,当列被定义为集合时它是如何工作的?

SSTableSimpleUnsortedWriter(File directory,
                                   IPartitioner partitioner,
                                   String keyspace,
                                   String columnFamily,
                                   AbstractType<?> comparator,
                                   AbstractType<?> subComparator,
                                   int bufferSizeInMB,
                                   CompressionParameters compressParameters)

1 个答案:

答案 0 :(得分:2)

您基本上必须查看存储引擎如何在内部存储行 - 插入一些示例数据,然后从cli中列出它应该有所帮助,以及阅读http://www.datastax.com/dev/blog/thrift-to-cql3

“正确”的解决方案是create a CQL-aware Writer