Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E1D293F7 for ; Fri, 13 Jan 2012 17:35:06 +0000 (UTC) Received: (qmail 42964 invoked by uid 500); 13 Jan 2012 17:35:06 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 42891 invoked by uid 500); 13 Jan 2012 17:35:05 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 42883 invoked by uid 99); 13 Jan 2012 17:35:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 17:35:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 17:35:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C025C14AAFC for ; Fri, 13 Jan 2012 17:34:40 +0000 (UTC) Date: Fri, 13 Jan 2012 17:34:40 +0000 (UTC) From: "Yuki Morishita (Commented) (JIRA)" To: commits@cassandra.apache.org Message-ID: <549338306.38314.1326476080803.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <157413878.37584.1326450939401.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-3738) sstable2json doesn't work for secondary index sstable due to partitioner mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-3738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185689#comment-13185689 ] Yuki Morishita commented on CASSANDRA-3738: ------------------------------------------- In what version do you use to create sstable? If that's 1.0.4, secondary index is created in wrong way.(CASSANDRA-3540) In that case, you have to drop index and rebuild index first. > sstable2json doesn't work for secondary index sstable due to partitioner mismatch > --------------------------------------------------------------------------------- > > Key: CASSANDRA-3738 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3738 > Project: Cassandra > Issue Type: Bug > Affects Versions: 1.0.6 > Environment: linux > Reporter: Shotaro Kamio > > sstable2json doesn't work for secondary index sstable in 1.0.6 while it worked in version 0.8.x. > $ bin/sstable2json $DATA/data/Keyspace1/users-hc-1-Data.db > { > "1111": [["birth_year","1973",1326450301786000], ["full_name","Patrick Rothfuss",1326450301782000]], > "1020": [["birth_year","1975",1326450301776000], ["full_name","Brandon Sanderson",1326450301716000]] > } > $ bin/sstable2json $DATA/data/Keyspace1/users.users_birth_year_idx-hc-1-Data.db > Exception in thread "main" java.lang.RuntimeException: Cannot open data/Keyspace1/users.users_birth_year_idx-hc-1 because partitioner does not match org.apache.cassandra.dht.RandomPartitioner > at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:145) > at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:123) > at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:118) > at org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:360) > at org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:373) > at org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:431) > I tested with following sample data via cli: > create keyspace Keyspace1; > use Keyspace1; > create column family users with comparator=UTF8Type and > column_metadata=[{column_name: full_name, validation_class: UTF8Type}, > {column_name: email, validation_class: UTF8Type}, > {column_name: birth_year, validation_class: LongType, index_type: KEYS}, > {column_name: state, validation_class: UTF8Type, index_type: KEYS}]; > set users[1020][full_name] = 'Brandon Sanderson'; > set users[1020][birth_year] = 1975; > set users[1111][full_name] = 'Patrick Rothfuss'; > set users[1111][birth_year] = 1973; > get users where birth_year = 1973; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira