[jira] [Created] (CASSANDRA-2736) The link for "Latest Builds" in the download page is incorrect
The link for "Latest Builds" in the download page is incorrect -- Key: CASSANDRA-2736 URL: https://issues.apache.org/jira/browse/CASSANDRA-2736 Project: Cassandra Issue Type: Bug Components: Documentation & website Reporter: Yaniv Kunda Priority: Trivial The link in the download page (http://cassandra.apache.org/download/) is outdated, pointing to {noformat}http://hudson.zones.apache.org/hudson/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/{noformat} and should probably replaced by {noformat}http://builds.apache.org/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/{noformat} In addition, the wording "Latest Builds" is incorrect per the link, and should be changed to "Latest Build" or more precisely "Latest Trunk Build". Alternatively, the link could instead point to either {noformat}https://builds.apache.org/job/Cassandra/changes{noformat} or {noformat}https://builds.apache.org/job/Cassandra{noformat}, both including a list of the latest trunk builds. Furthermore, it might be sensible to have additional links to 0.6, 0.7 & 0.8 builds - as it's more probable users are running those rather than the trunk version. Finally (I didn't think I'd right so much about a link...), I believe the text "(Hudson)" next to the link is not up-to-date, and should be replaced by "(Jenkins)" or removed altogether. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-1610) Pluggable Compaction
[ https://issues.apache.org/jira/browse/CASSANDRA-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-1610: -- Reviewer: bcoverston (was: stuhood) > Pluggable Compaction > > > Key: CASSANDRA-1610 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1610 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Chris Goffinet >Assignee: Alan Liang >Priority: Minor > Labels: compaction > Fix For: 1.0 > > Attachments: 0001-move-compaction-code-into-own-package.patch, > 0001-move-compaction-code-into-own-package.patch, > 0002-Pluggable-Compaction-and-Expiration.patch, > 0002-pluggable-compaction.patch > > > In CASSANDRA-1608, I proposed some changes on how compaction works. I think > it also makes sense to allow the ability to have pluggable compaction per CF. > There could be many types of workloads where this makes sense. One example we > had at Digg was to completely throw away certain SSTables after N days. > This ticket addresses making compaction pluggable only. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2732) StringIndexOutOfBoundsException when specifying JDBC connection string without user and password
[ https://issues.apache.org/jira/browse/CASSANDRA-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042588#comment-13042588 ] Rick Shaw commented on CASSANDRA-2732: -- Sure... in for a penny... > StringIndexOutOfBoundsException when specifying JDBC connection string > without user and password > > > Key: CASSANDRA-2732 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2732 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.8 beta 1 >Reporter: Cathy Daw >Assignee: Rick Shaw >Priority: Trivial > Labels: cql > > *PASS: specify connection string user and password* > _connection = > DriverManager.getConnection("jdbc:cassandra:root/root@localhost:9170/default")_ > *FAIL: specify connection string without user and password* > _connection = > DriverManager.getConnection("jdbc:cassandra://localhost:9170/default")_ > {code} > [junit] String index out of range: -1 > [junit] java.lang.StringIndexOutOfBoundsException: String index out of range: > -1 > [junit] at java.lang.String.substring(String.java:1937) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:86) > [junit] at java.sql.DriverManager.getConnection(DriverManager.java:582) > [junit] at java.sql.DriverManager.getConnection(DriverManager.java:207) > [junit] at > com.datastax.cql.runJDBCSmokeTest.setUpBeforeClass(runJDBCSmokeTest.java:45) > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2735) Timestamp Based Compaction Strategy
[ https://issues.apache.org/jira/browse/CASSANDRA-2735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Liang updated CASSANDRA-2735: -- Attachment: 0003-implemented-timestamp-bucketed-compaction-strategy-a.patch > Timestamp Based Compaction Strategy > --- > > Key: CASSANDRA-2735 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2735 > Project: Cassandra > Issue Type: New Feature > Components: Core >Reporter: Alan Liang >Assignee: Alan Liang >Priority: Minor > Attachments: > 0003-implemented-timestamp-bucketed-compaction-strategy-a.patch > > > Compaction strategy implementation based on max timestamp ordering of the > sstables while satisfying max sstable size, min and max compaction > thresholds. It also handles expiration of sstables based on a timestamp. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2735) Timestamp Based Compaction Strategy
Timestamp Based Compaction Strategy --- Key: CASSANDRA-2735 URL: https://issues.apache.org/jira/browse/CASSANDRA-2735 Project: Cassandra Issue Type: New Feature Components: Core Reporter: Alan Liang Assignee: Alan Liang Priority: Minor Compaction strategy implementation based on max timestamp ordering of the sstables while satisfying max sstable size, min and max compaction thresholds. It also handles expiration of sstables based on a timestamp. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-1610) Pluggable Compaction
[ https://issues.apache.org/jira/browse/CASSANDRA-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Liang updated CASSANDRA-1610: -- Description: In CASSANDRA-1608, I proposed some changes on how compaction works. I think it also makes sense to allow the ability to have pluggable compaction per CF. There could be many types of workloads where this makes sense. One example we had at Digg was to completely throw away certain SSTables after N days. This ticket addresses making compaction pluggable only. was: In CASSANDRA-1608, I proposed some changes on how compaction works. I think it also makes sense to allow the ability to have pluggable compaction per CF. There could be many types of workloads where this makes sense. One example we had at Digg was to completely throw away certain SSTables after N days. The goal of this ticket is to make compaction pluggable enough to support compaction based on max timestamp ordering of the sstables while satisfying max sstable size, min and max compaction thresholds. Another goal is to allow expiration of sstables based on a timestamp. > Pluggable Compaction > > > Key: CASSANDRA-1610 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1610 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Chris Goffinet >Assignee: Alan Liang >Priority: Minor > Labels: compaction > Fix For: 1.0 > > Attachments: 0001-move-compaction-code-into-own-package.patch, > 0001-move-compaction-code-into-own-package.patch, > 0002-Pluggable-Compaction-and-Expiration.patch, > 0002-pluggable-compaction.patch > > > In CASSANDRA-1608, I proposed some changes on how compaction works. I think > it also makes sense to allow the ability to have pluggable compaction per CF. > There could be many types of workloads where this makes sense. One example we > had at Digg was to completely throw away certain SSTables after N days. > This ticket addresses making compaction pluggable only. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-1610) Pluggable Compaction
[ https://issues.apache.org/jira/browse/CASSANDRA-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Liang updated CASSANDRA-1610: -- Attachment: 0002-pluggable-compaction.patch 0001-move-compaction-code-into-own-package.patch 2nd attempt after rebasing with trunk > Pluggable Compaction > > > Key: CASSANDRA-1610 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1610 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Chris Goffinet >Assignee: Alan Liang >Priority: Minor > Labels: compaction > Fix For: 1.0 > > Attachments: 0001-move-compaction-code-into-own-package.patch, > 0001-move-compaction-code-into-own-package.patch, > 0002-Pluggable-Compaction-and-Expiration.patch, > 0002-pluggable-compaction.patch > > > In CASSANDRA-1608, I proposed some changes on how compaction works. I think > it also makes sense to allow the ability to have pluggable compaction per CF. > There could be many types of workloads where this makes sense. One example we > had at Digg was to completely throw away certain SSTables after N days. > The goal of this ticket is to make compaction pluggable enough to support > compaction based on max timestamp ordering of the sstables while satisfying > max sstable size, min and max compaction thresholds. Another goal is to allow > expiration of sstables based on a timestamp. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042562#comment-13042562 ] Jonathan Ellis edited comment on CASSANDRA-2617 at 6/2/11 1:48 AM: --- ThriftValidation is really the right place to validate user-supplied data. I'm strongly against passing null names around all the way to apply and then having it suddenly decide to generate one. That's a good way to cause subtle bugs. was (Author: jbellis): ThriftValidation is really the right place to validate user-supplied data. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-2734) NPE running res.next() for a select statement
[ https://issues.apache.org/jira/browse/CASSANDRA-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis reassigned CASSANDRA-2734: - Assignee: Aaron Morton Aaron, might this be a regression from CASSANDRA-2311? I see makeKeyColumn at the top of the ST. > NPE running res.next() for a select statement > - > > Key: CASSANDRA-2734 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2734 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.8.0 beta 2 >Reporter: Cathy Daw >Assignee: Aaron Morton >Priority: Minor > Labels: cql > > *The following statement fails when used with a Statement or > PreparedStatement* > {code} > res = stmt.executeQuery("SELECT bar FROM users"); > res.next(); > {code} > *Error Message* > {code} > [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest):Caused > an ERROR > [junit] null > [junit] java.lang.NullPointerException > [junit] at > org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) > [junit] at > org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) > [junit] at > com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) > [junit] > [junit] > [junit] Test com.datastax.cql.reproBugTest FAILED > {code} > *Here is a quick repro. Showing that res.next() works with other statements > but not select.* > _Also notice that ResultSet.getMetaData().getColumnCount() always returns > zero._ > _I noticed in the existing driver tests similar test cases, so not sure the > issue._ > *Steps to run script* > * you will need to drop this in your test directory > * change the package declaration > * ant test -Dtest.name=reproBugTest > {code} > package com.datastax.cql; > import java.sql.DriverManager; > import java.sql.Connection; > import java.sql.ResultSet; > import java.sql.SQLException; > import java.sql.Statement; > import org.junit.Test; > public class reproBugTest { > > @Test > public void simpleSelect() throws Exception { > Connection connection = null; > ResultSet res; > Statement stmt; > int colCount = 0; > > try { > Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver"); > > // Check create keyspace > connection = > DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/default"); > > stmt = connection.createStatement(); > try { > System.out.println("Running DROP KS Statement"); > res = stmt.executeQuery("DROP KEYSPACE ks1"); > res.next(); > > System.out.println("Running CREATE KS Statement"); > res = stmt.executeQuery("CREATE KEYSPACE ks1 with > strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and > strategy_options:replication_factor=1"); > res.next(); > } catch (SQLException e) { > if (e.getMessage().startsWith("Keyspace does not exist")) > { > res = stmt.executeQuery("CREATE KEYSPACE ks1 with > strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and > strategy_options:replication_factor=1"); > } > } > connection.close(); > > // Run Test > connection = > DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/ks1"); > > stmt = connection.createStatement(); > System.out.print("Running CREATE CF Statement"); > res = stmt.executeQuery("CREATE COLUMNFAMILY users (KEY varchar > PRIMARY KEY, password varchar, gender varchar, session_token varchar, state > varchar, birth_year bigint)"); > colCount = res.getMetaData().getColumnCount(); > System.out.println(" -- Column Count: " + colCount); > res.next(); > > System.out.print("Running INSERT Statement"); > res = stmt.executeQuery("INSERT INTO users (KEY, password) VALUES > ('user1', 'ch@nge')"); > colCount = res.getMetaData().getColumnCount(); > System.out.println(" -- Column Count: " + colCount); > res.next(); > > System.out.print("Running SELECT Statement"); > res = stmt.executeQuery("SELECT bar FROM users"); > colCount = res.getMetaData().getColumnCount(); > System.out.println(" -- Column Count: " + colCount); > res.getRow(); > res.next(); > > connection.close(); > } catch (SQLException e) { > e.printStackTrace();
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042562#comment-13042562 ] Jonathan Ellis commented on CASSANDRA-2617: --- ThriftValidation is really the right place to validate user-supplied data. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-2732) StringIndexOutOfBoundsException when specifying JDBC connection string without user and password
[ https://issues.apache.org/jira/browse/CASSANDRA-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis reassigned CASSANDRA-2732: - Assignee: Rick Shaw Rick, do you want to take a stab at this? > StringIndexOutOfBoundsException when specifying JDBC connection string > without user and password > > > Key: CASSANDRA-2732 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2732 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.8 beta 1 >Reporter: Cathy Daw >Assignee: Rick Shaw >Priority: Trivial > Labels: cql > > *PASS: specify connection string user and password* > _connection = > DriverManager.getConnection("jdbc:cassandra:root/root@localhost:9170/default")_ > *FAIL: specify connection string without user and password* > _connection = > DriverManager.getConnection("jdbc:cassandra://localhost:9170/default")_ > {code} > [junit] String index out of range: -1 > [junit] java.lang.StringIndexOutOfBoundsException: String index out of range: > -1 > [junit] at java.lang.String.substring(String.java:1937) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) > [junit] at > org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:86) > [junit] at java.sql.DriverManager.getConnection(DriverManager.java:582) > [junit] at java.sql.DriverManager.getConnection(DriverManager.java:207) > [junit] at > com.datastax.cql.runJDBCSmokeTest.setUpBeforeClass(runJDBCSmokeTest.java:45) > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2713) Null strategy_options on a KsDef leads to an NPE.
[ https://issues.apache.org/jira/browse/CASSANDRA-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042561#comment-13042561 ] Jonathan Ellis commented on CASSANDRA-2713: --- merged to 0.8 branch in r1130370 > Null strategy_options on a KsDef leads to an NPE. > - > > Key: CASSANDRA-2713 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2713 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.8.0 beta 2 >Reporter: Jon Hermes >Assignee: Jon Hermes >Priority: Minor > Fix For: 0.8.0 > > Attachments: 2713-allow.txt, 2713-disallow.txt > > > For add/update keyspace, a KsDef with null strategy_options will cause an NPE. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130370 - in /cassandra/branches/cassandra-0.8: ./ contrib/ debian/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassan
Author: jbellis Date: Thu Jun 2 01:42:17 2011 New Revision: 1130370 URL: http://svn.apache.org/viewvc?rev=1130370&view=rev Log: merge from 0.8.0 Modified: cassandra/branches/cassandra-0.8/ (props changed) cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/build.xml cassandra/branches/cassandra-0.8/contrib/ (props changed) cassandra/branches/cassandra-0.8/debian/changelog cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java (props changed) cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/KSMetaData.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/DataTracker.java Propchange: cassandra/branches/cassandra-0.8/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 2 01:42:17 2011 @@ -2,7 +2,7 @@ /cassandra/branches/cassandra-0.7:1026516-1128347,1129151,1130191 /cassandra/branches/cassandra-0.7.0:1053690-1055654 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041 -/cassandra/branches/cassandra-0.8.0:1125021-1127636,1129154 +/cassandra/branches/cassandra-0.8.0:1125021-1130369 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689 /cassandra/tags/cassandra-0.8.0-rc1:1102511-1125020 /cassandra/trunk:1129049-1129050,1129065 Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130370&r1=1130369&r2=1130370&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Thu Jun 2 01:42:17 2011 @@ -44,10 +44,11 @@ * switch to native Thrift for Hadoop map/reduce (CASSANDRA-2667) * fix StackOverflowError when building from eclipse (CASSANDRA-2687) * only provide replication_factor to strategy_options "help" for - SimpleStrategy, OldNetworkTopologyStrategy (CASSANDRA-2678) + SimpleStrategy, OldNetworkTopologyStrategy (CASSANDRA-2678, 2713) * fix exception adding validators to non-string columns (CASSANDRA-2696) * avoid instantiating DatabaseDescriptor in JDBC (CASSANDRA-2694) * fix potential stack overflow during compaction (CASSANDRA-2626) + * clone super columns to avoid modifying them during flush (CASSANDRA-2675) * reset underlying iterator in EchoedRow constructor (CASSANDRA-2653) Modified: cassandra/branches/cassandra-0.8/build.xml URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/build.xml?rev=1130370&r1=1130369&r2=1130370&view=diff == --- cassandra/branches/cassandra-0.8/build.xml (original) +++ cassandra/branches/cassandra-0.8/build.xml Thu Jun 2 01:42:17 2011 @@ -64,7 +64,7 @@ - + @@ -693,7 +693,6 @@ url=${svn.entry.url}?pathrev=${svn.entry destdir="${build.classes.main}" includeantruntime="false"> - - + + + + @@ -1024,6 +1026,7 @@ url=${svn.entry.url}?pathrev=${svn.entry + Propchange: cassandra/branches/cassandra-0.8/contrib/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 2 01:42:17 2011 @@ -2,7 +2,7 @@ /cassandra/branches/cassandra-0.7/contrib:1026516-1128347,1129151,1130191 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041 -/cassandra/branches/cassandra-0.8.0/contrib:1125021-1127636,1129154 +/cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689 /cassandra/tags/cassandra-0.8.0-rc1/contrib:1102511-1125020 /cassandra/trunk/contrib:1129049-1129050,1129065 Modified: cassandra/branches/cassandra-0.8/debian/changelog URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/debian/changelog?rev=1130370&r1=1130369&r2=1130370&view=diff == --- cassandra/branches/cassandra-0.8/debian/changelog (original) +++ cassandra/branches/cassand
[jira] [Updated] (CASSANDRA-2734) NPE running res.next() for a select statement
[ https://issues.apache.org/jira/browse/CASSANDRA-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cathy Daw updated CASSANDRA-2734: - Description: *The following statement fails when used with a Statement or PreparedStatement* {code} res = stmt.executeQuery("SELECT bar FROM users"); res.next(); {code} *Error Message* {code} [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest): Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) [junit] at org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) [junit] at com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) [junit] [junit] [junit] Test com.datastax.cql.reproBugTest FAILED {code} *Here is a quick repro. Showing that res.next() works with other statements but not select.* _Also notice that ResultSet.getMetaData().getColumnCount() always returns zero._ _I noticed in the existing driver tests similar test cases, so not sure the issue._ *Steps to run script* * you will need to drop this in your test directory * change the package declaration * ant test -Dtest.name=reproBugTest {code} package com.datastax.cql; import java.sql.DriverManager; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.junit.Test; public class reproBugTest { @Test public void simpleSelect() throws Exception { Connection connection = null; ResultSet res; Statement stmt; int colCount = 0; try { Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver"); // Check create keyspace connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/default"); stmt = connection.createStatement(); try { System.out.println("Running DROP KS Statement"); res = stmt.executeQuery("DROP KEYSPACE ks1"); res.next(); System.out.println("Running CREATE KS Statement"); res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); res.next(); } catch (SQLException e) { if (e.getMessage().startsWith("Keyspace does not exist")) { res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); } } connection.close(); // Run Test connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/ks1"); stmt = connection.createStatement(); System.out.print("Running CREATE CF Statement"); res = stmt.executeQuery("CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint)"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.next(); System.out.print("Running INSERT Statement"); res = stmt.executeQuery("INSERT INTO users (KEY, password) VALUES ('user1', 'ch@nge')"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.next(); System.out.print("Running SELECT Statement"); res = stmt.executeQuery("SELECT bar FROM users"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.getRow(); res.next(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } {code} was: *The following statement fails when used with a Statement or PreparedStatement* {code} res = stmt.executeQuery("SELECT bar FROM users"); res.next(); {code} *Error Message* {code} [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest): Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) [junit] at org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) [junit] at com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) [junit] [junit] [junit] Test com.datastax.cql.reproBugTest FAILED {code} *Here is a quick re
[jira] [Updated] (CASSANDRA-2734) NPE running res.next() for a select statement
[ https://issues.apache.org/jira/browse/CASSANDRA-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cathy Daw updated CASSANDRA-2734: - Description: *The following statement fails when used with a Statement or PreparedStatement* {code} res = stmt.executeQuery("SELECT bar FROM users"); res.next(); {code} *Error Message* {code} [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest): Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) [junit] at org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) [junit] at com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) [junit] [junit] [junit] Test com.datastax.cql.reproBugTest FAILED {code} *Here is a quick repro. Showing that res.next() works with other statements but not select. I noticed in the existing driver tests similar test cases, so not sure the issue.* * you will need to drop this in your test directory * change the package declaration * ant test -Dtest.name=reproBugTest {code} package com.datastax.cql; import java.sql.DriverManager; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.junit.Test; public class reproBugTest { @Test public void simpleSelect() throws Exception { Connection connection = null; ResultSet res; Statement stmt; int colCount = 0; try { Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver"); // Check create keyspace connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/default"); stmt = connection.createStatement(); try { System.out.println("Running DROP KS Statement"); res = stmt.executeQuery("DROP KEYSPACE ks1"); res.next(); System.out.println("Running CREATE KS Statement"); res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); res.next(); } catch (SQLException e) { if (e.getMessage().startsWith("Keyspace does not exist")) { res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); } } connection.close(); // Run Test connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/ks1"); stmt = connection.createStatement(); System.out.print("Running CREATE CF Statement"); res = stmt.executeQuery("CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint)"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.next(); System.out.print("Running INSERT Statement"); res = stmt.executeQuery("INSERT INTO users (KEY, password) VALUES ('user1', 'ch@nge')"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.next(); System.out.print("Running SELECT Statement"); res = stmt.executeQuery("SELECT bar FROM users"); colCount = res.getMetaData().getColumnCount(); System.out.println(" -- Column Count: " + colCount); res.getRow(); res.next(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } {code} was: *The following statement fails when used with a Statement or PreparedStatement* {code} res = stmt.executeQuery("SELECT bar FROM users"); res.next(); {code} *Error Message* {code} [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest): Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) [junit] at org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) [junit] at com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) [junit] [junit] [junit] Test com.datastax.cql.reproBugTest FAILED {code} *Here is a quick repro. Showing that res.next() works with other statements but not select. I noticed in the existing driver
[jira] [Created] (CASSANDRA-2734) NPE running res.next() for a select statement
NPE running res.next() for a select statement - Key: CASSANDRA-2734 URL: https://issues.apache.org/jira/browse/CASSANDRA-2734 Project: Cassandra Issue Type: Bug Affects Versions: 0.8.0 beta 2 Reporter: Cathy Daw Priority: Minor *The following statement fails when used with a Statement or PreparedStatement* {code} res = stmt.executeQuery("SELECT bar FROM users"); res.next(); {code} *Error Message* {code} [junit] Testcase: simpleSelect(com.datastax.cql.reproBugTest): Caused an ERROR [junit] null [junit] java.lang.NullPointerException [junit] at org.apache.cassandra.cql.jdbc.ColumnDecoder.makeKeyColumn(ColumnDecoder.java:136) [junit] at org.apache.cassandra.cql.jdbc.CResultSet.next(CResultSet.java:388) [junit] at com.datastax.cql.reproBugTest.simpleSelect(reproBugTest.java:57) [junit] [junit] [junit] Test com.datastax.cql.reproBugTest FAILED {code} *Here is a quick repro. Showing that res.next() works with other statements but not select. I noticed in the existing driver tests similar test cases, so not sure the issue.* * you will need to drop this in your test directory * change the package declaration * ant test -Dtest.name=reproBugTest {code} package com.datastax.cql; import java.sql.DriverManager; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.junit.Test; public class reproBugTest { @Test public void simpleSelect() throws Exception { Connection connection = null; ResultSet res; Statement stmt; try { Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver"); // Check create keyspace connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/default"); stmt = connection.createStatement(); try { System.out.println("Running DROP KS Statement"); res = stmt.executeQuery("DROP KEYSPACE ks1"); res.next(); System.out.println("Running CREATE KS Statement"); res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); res.next(); } catch (SQLException e) { if (e.getMessage().startsWith("Keyspace does not exist")) { res = stmt.executeQuery("CREATE KEYSPACE ks1 with strategy_class = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options:replication_factor=1"); } } connection.close(); // Run Test connection = DriverManager.getConnection("jdbc:cassandra:root/root@127.0.0.1:9160/ks1"); stmt = connection.createStatement(); System.out.println("Running CREATE CF Statement"); res = stmt.executeQuery("CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, state varchar, birth_year bigint)"); res.next(); System.out.println("Running INSERT Statement"); res = stmt.executeQuery("INSERT INTO users (KEY, password) VALUES ('user1', 'ch@nge')"); res.next(); System.out.println("Running SELECT Statement"); res = stmt.executeQuery("SELECT bar FROM users"); res.next(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc
[ https://issues.apache.org/jira/browse/CASSANDRA-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vijay updated CASSANDRA-2733: - Attachment: EC2Snitch-Patch-2733.patch EC2Snitch-test-2733.patch Attached patch to use equals and also test case for the same. > nodetool ring with EC2Snitch, NPE checking for the zone and dc > -- > > Key: CASSANDRA-2733 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2733 > Project: Cassandra > Issue Type: New Feature > Components: Contrib >Affects Versions: 0.8.0 > Environment: Cassandra JVM >Reporter: Vijay >Assignee: Vijay >Priority: Minor > Fix For: 0.8.0 > > Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch > > > Existing EC2Snitch... compare is done via == instead of equals() while > comparing the IP's... > (endpoint == FBUtilities.getLocalAddress()) > It is ok to compare the Object Address as most of the code uses > FBU.getLocalAddress() and it returns the same object everywhere... but it > breaks nodetool ring. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc
nodetool ring with EC2Snitch, NPE checking for the zone and dc -- Key: CASSANDRA-2733 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733 Project: Cassandra Issue Type: New Feature Components: Contrib Affects Versions: 0.8.0 Environment: Cassandra JVM Reporter: Vijay Assignee: Vijay Priority: Minor Fix For: 0.8.0 Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... (endpoint == FBUtilities.getLocalAddress()) It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2732) StringIndexOutOfBoundsException when specifying JDBC connection string without user and password
StringIndexOutOfBoundsException when specifying JDBC connection string without user and password Key: CASSANDRA-2732 URL: https://issues.apache.org/jira/browse/CASSANDRA-2732 Project: Cassandra Issue Type: Bug Affects Versions: 0.8 beta 1 Reporter: Cathy Daw Priority: Trivial *PASS: specify connection string user and password* _connection = DriverManager.getConnection("jdbc:cassandra:root/root@localhost:9170/default")_ *FAIL: specify connection string without user and password* _connection = DriverManager.getConnection("jdbc:cassandra://localhost:9170/default")_ {code} [junit] String index out of range: -1 [junit] java.lang.StringIndexOutOfBoundsException: String index out of range: -1 [junit] at java.lang.String.substring(String.java:1937) [junit] at org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) [junit] at org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:74) [junit] at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:86) [junit] at java.sql.DriverManager.getConnection(DriverManager.java:582) [junit] at java.sql.DriverManager.getConnection(DriverManager.java:207) [junit] at com.datastax.cql.runJDBCSmokeTest.setUpBeforeClass(runJDBCSmokeTest.java:45) {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042501#comment-13042501 ] Pavel Yaskevich commented on CASSANDRA-2617: Took a look at the code again and think that I rather add an extra validation in apply() where we have information about new/old columns than place that changes to CS/QP. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042490#comment-13042490 ] Pavel Yaskevich commented on CASSANDRA-2617: Sure > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042489#comment-13042489 ] Jonathan Ellis commented on CASSANDRA-2617: --- I'd rather have a small amount of code duplication, than have validate do something unexpected like that. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2731) Impelement in-house file caching.
Impelement in-house file caching. - Key: CASSANDRA-2731 URL: https://issues.apache.org/jira/browse/CASSANDRA-2731 Project: Cassandra Issue Type: New Feature Components: Core Affects Versions: 1.0 Reporter: Pavel Yaskevich Assignee: Pavel Yaskevich Implement FileCache, CachedRandomAccessFile (to replace BufferedRandomAccessFile) and RadixTree (to play role of the backend cache storage) classes. FileCache class with be responsible for storing/retrieving data from Radix Tree and also flushing of the dirty pages to the disk, page management such as adding new pages, utilizing old/unused pages. CRAF Linux only features (via JNI): 1). O_DIRECT for both read/write operations. 2). AIO's lio_listio write operation batching. Provide possibility to migrate hot data directly from Memtable to CRAF cache to keep live-reads data always hot in memory. To minimise compaction effects CRAF should provide a way to by-pass a caching data if it does not already exists. Provide a way to make pointers in the cache which will be useful to minimize impact on performance when a single column is distributed among multiple SSTable files (except counter columns). Use jemalloc (http://www.canonware.com/jemalloc/) for cache memory management. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2725) Update the JDBC semantics contained in the class AbstractResultSet
[ https://issues.apache.org/jira/browse/CASSANDRA-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2725: - Attachment: (was: Cleanup-semantics for-JDBC-AbstractResultSet-v1.txt) > Update the JDBC semantics contained in the class AbstractResultSet > -- > > Key: CASSANDRA-2725 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2725 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, jdbc > Fix For: 0.8.1 > > > The {{AbstractResultSet}} cleverly isolates all the methods that are not > planned to be implemented in the next release of of the JDBC Result Set > implemented by the class {{CResultSet}}. This improvement will tighten the > JDBC semantics for this set of methods. > This improvement is related to > [CASSANDRA-2720|https://issues.apache.org/jira/browse/CASSANDRA-2720] but is > not blocked by it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042429#comment-13042429 ] Pavel Yaskevich commented on CASSANDRA-2617: How about we do replace of nulls to ByteBufferUtil.bytesToHex() inside of TV.validateCfDef() right before index names validation? It seems to be the only place we can put that without duplicating the code... > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2713) Null strategy_options on a KsDef leads to an NPE.
[ https://issues.apache.org/jira/browse/CASSANDRA-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042407#comment-13042407 ] Cathy Daw commented on CASSANDRA-2713: -- I verified this fix by dropping in the c* 0.8.0 jar file into brisk. Can we get this merged to the Cassandra 0.8 branch since brisk builds its jar file from there? > Null strategy_options on a KsDef leads to an NPE. > - > > Key: CASSANDRA-2713 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2713 > Project: Cassandra > Issue Type: Bug >Affects Versions: 0.8.0 beta 2 >Reporter: Jon Hermes >Assignee: Jon Hermes >Priority: Minor > Fix For: 0.8.0 > > Attachments: 2713-allow.txt, 2713-disallow.txt > > > For add/update keyspace, a KsDef with null strategy_options will cause an NPE. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-2730: -- Attachment: 2730.txt Attached patch fixes the problem, but requires CASSANDRA-2617 to be finished first. > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > Attachments: 2730.txt > > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042385#comment-13042385 ] Jonathan Ellis commented on CASSANDRA-2730: --- correct > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042383#comment-13042383 ] Pavel Yaskevich commented on CASSANDRA-2617: I tried to do the following modification in inflate: {noformat} for (ColumnDef aColumn_metadata : cf.column_metadata) { ColumnDefinition cd = ColumnDefinition.inflate(aColumn_metadata); if (cd.getIndexName() == null) cd.setIndexName(ByteBufferUtil.bytesToHex(cd.name)); column_metadata.put(cd.name, cd); } {noformat} but I got fail in the DefsTest:177 that stored/loaded keyspaces does not match, tried to play with inflate/deflate for both CFDM and ColumnDefinition but then decided to just keep old code in the indexColumnFamilyName instead. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042382#comment-13042382 ] BAONING WU commented on CASSANDRA-2730: --- so this "drop index" is in 0.8.1? I can't find it in my 0.8.0-rc1. > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042380#comment-13042380 ] Jonathan Ellis commented on CASSANDRA-2617: --- bq. For new indexes I think putting it in AddCF/UpdateCF is better than in CFM.apply. ... no, that doesn't actually work, or we risk CASSANDRA-2730 still. I think the name munging needs to happen in CassandraServer/QueryProcessor, before we call TV.validateCfDef. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042378#comment-13042378 ] Jonathan Ellis commented on CASSANDRA-2617: --- It looks like v2 doesn't give names to "old" indexes for someone migrating from 0.7.x or 0.8.0. You need code in CFM.inflate for that. (apply is only called when processing a new mutation, not when loading an existing schema.) For new indexes I think putting it in AddCF/UpdateCF is better than in CFM.apply. > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-2617: --- Attachment: CASSANDRA-2617-v2.patch > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617-v2.patch, CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130267 - /cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
Author: brandonwilliams Date: Wed Jun 1 19:11:33 2011 New Revision: 1130267 URL: http://svn.apache.org/viewvc?rev=1130267&view=rev Log: Fix pig build Modified: cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java Modified: cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java?rev=1130267&r1=1130266&r2=1130267&view=diff == --- cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java (original) +++ cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java Wed Jun 1 19:11:33 2011 @@ -357,12 +357,12 @@ public class CassandraStorage extends Lo Mutation mutation = new Mutation(); if (DataType.findType(pair.get(1)) == DataType.BAG) // supercolumn { - org.apache.cassandra.hadoop.avro.SuperColumn sc = new org.apache.cassandra.hadoop.avro.SuperColumn(); + org.apache.cassandra.thrift.SuperColumn sc = new org.apache.cassandra.thrift.SuperColumn(); sc.name = objToBB(pair.get(0)); - ArrayList columns = new ArrayList(); + ArrayList columns = new ArrayList(); for (Tuple subcol : (DefaultDataBag) pair.get(1)) { - org.apache.cassandra.hadoop.avro.Column column = new org.apache.cassandra.hadoop.avro.Column(); + org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column(); column.name = objToBB(subcol.get(0)); column.value = objToBB(subcol.get(1)); column.setTimestamp(System.currentTimeMillis() * 1000);
[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:47 PM: -- *For clarity, this occurs only when you create the same named index referencing different columns* * Workaround #1: In CQLSH: Prior to restarting server, drop this column family after you see this error, then future server restarts will be fine. * Workaround #2: In cassandra-cli: Prior to restarting server, run the "drop index cf column" command for both attempts (birth_year and session_token in my example), then future server restarts will be fine. {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} was (Author: cdaw): *For clarity, this occurs only when you create the same named index referencing different columns* * Workaround #1: In CQLSH: Prior to restarting server, drop this column family after you see this error, then future server restarts will be fine. * Workaround #2: In cassandra-cli: Prior to restarting server, run the drop index command for this index, then future server restarts will be fine. {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042343#comment-13042343 ] Rick Shaw edited comment on CASSANDRA-2530 at 6/1/11 6:44 PM: -- {quote} Isn't date throwing away information when it encodes to long (the time zone)? {quote} I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. {quote} Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic. {quote} Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. {quote} Using compareUnsigned in the boolean compare method seems like overkill. {quote} Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}. was (Author: ardot): {quote} Isn't date throwing away information when it encodes to long (the time zone)? {quote} I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. {quote} Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic. {quote} Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. {quote} Using compareUnsigned in the boolean compare method seems like overkill. {quote} Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}. > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:44 PM: -- *For clarity, this occurs only when you create the same named index referencing different columns* * Workaround #1: In CQLSH: Prior to restarting server, drop this column family after you see this error, then you future restarts will be fine. * Workaround #2: In cassandra-cli: Prior to restarting server, run the drop index command for this index {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} was (Author: cdaw): *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster. If you immediately drop this column family after you see this error, then you future restarts will be fine._ {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:45 PM: -- *For clarity, this occurs only when you create the same named index referencing different columns* * Workaround #1: In CQLSH: Prior to restarting server, drop this column family after you see this error, then future server restarts will be fine. * Workaround #2: In cassandra-cli: Prior to restarting server, run the drop index command for this index, then future server restarts will be fine. {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} was (Author: cdaw): *For clarity, this occurs only when you create the same named index referencing different columns* * Workaround #1: In CQLSH: Prior to restarting server, drop this column family after you see this error, then you future restarts will be fine. * Workaround #2: In cassandra-cli: Prior to restarting server, run the drop index command for this index {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:40 PM: -- *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster. If you immediately drop this column family after you see this error, then you future restarts will be fine._ {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} was (Author: cdaw): *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster_ {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:30 PM: -- *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster_ {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} was (Author: cdaw): *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster* {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2730) exception generate when using same index names
[ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] Cathy Daw commented on CASSANDRA-2730: -- *For clarity, this occurs only when you create the same named index referencing different columns* _The following prevents future start-up of the cluster* {code} cqlsh> CREATE INDEX birth_year_key ON users (session_token); Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key {code} *PASS: CQLSH allows multiple indexes without an issue* {code} cqlsh> CREATE INDEX gender_key ON users (gender); cqlsh> CREATE INDEX state_key ON users (state); cqlsh> CREATE INDEX birth_year_key ON users (birth_year); {code} *PASS: CQLSH correctly errors out creating the same index twice* {code} cqlsh> CREATE INDEX birth_year_key ON users (birth_year); Bad Request: Index exists {code} > exception generate when using same index names > -- > > Key: CASSANDRA-2730 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.8 beta 1 >Reporter: BAONING WU > Labels: cql > > when using cqlsh tool to generate indexes, for example, suppose we have a > column family Tuser, which has two columns: name and state. > cqlsh> create index name_key on Tuser(name); > cqlsh> create index name_key on Tuser(state); > note that name_key is used twice by mistake, then a > javax.management.InstanceAlreadyExistsException will be thrown and this > exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-1709) CQL keyspace and column family management
[ https://issues.apache.org/jira/browse/CASSANDRA-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042347#comment-13042347 ] Hudson commented on CASSANDRA-1709: --- Integrated in Cassandra-0.8 #149 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/149/]) add CQL ALTER TABLE patch by pyaskevich; reviewed by jbellis for CASSANDRA-1709 jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130200 Files : * /cassandra/branches/cassandra-0.8/test/system/test_cql.py * /cassandra/branches/cassandra-0.8/CHANGES.txt * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/StatementType.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/QueryProcessor.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g * /cassandra/branches/cassandra-0.8/doc/cql/CQL.textile > CQL keyspace and column family management > - > > Key: CASSANDRA-1709 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1709 > Project: Cassandra > Issue Type: Sub-task > Components: API >Affects Versions: 0.8 beta 1 >Reporter: Eric Evans >Assignee: Pavel Yaskevich >Priority: Minor > Labels: cql > Fix For: 0.8.1 > > Attachments: CASSANDRA-1709-alter-table-statement-v2.patch, > CASSANDRA-1709-alter-table-statement.patch, > v1-0001-CASSANDRA-1709-CQL-DROP-implementations.txt, > v1-0002-system-tests-for-CQL-DROPs.txt, v1-0003-updated-doco-for-CQL-DROPs.txt > > Original Estimate: 0h > Remaining Estimate: 0h > > CQL specification and implementation for schema management. > This corresponds to the following RPC methods: > * system_add_column_family() > * system_add_keyspace() > * system_drop_keyspace() > * system_update_keyspace() > * system_update_columnfamily() > *Update: 2011-04-11* > All that remains for the Cassandra 1.0 timeline is {{ALTER}} (scroll down for > the agreed upon specification). {{CREATE}} and {{DROP}} are complete. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2267) stress.java daemon mode
[ https://issues.apache.org/jira/browse/CASSANDRA-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042346#comment-13042346 ] Hudson commented on CASSANDRA-2267: --- Integrated in Cassandra-0.8 #149 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/149/]) stress.java daemon mode. Patch by Pavel Yaskevich, reviewed by brandonwilliams for CASSANDRA-2267 brandonwilliams : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130223 Files : * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/server * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/MultiGetter.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/server/StressThread.java * /cassandra/branches/cassandra-0.8/tools/stress/bin/stressd * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/Inserter.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/Session.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/Reader.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/util/Operation.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/StressAction.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/RangeSlicer.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/StressServer.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/IndexedRangeSlicer.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/CounterGetter.java * /cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/Stress.java > stress.java daemon mode > --- > > Key: CASSANDRA-2267 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2267 > Project: Cassandra > Issue Type: Improvement > Components: Contrib >Affects Versions: 0.7.1 >Reporter: Brandon Williams >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2267-v2.patch, CASSANDRA-2267.patch > > > stress.java uses a JVM, but there is no way to warm it up, which skews > results. It would be nice if there was some sort of daemon mode so the JVM > could stay hot, and even better if there was a way to control the daemon > programmatically, perhaps via JMX. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2704) provide a typed key value for returned rows via JDBC
[ https://issues.apache.org/jira/browse/CASSANDRA-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042345#comment-13042345 ] Hudson commented on CASSANDRA-2704: --- Integrated in Cassandra-0.8 #149 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/149/]) add key-as-TypedColumn to CassandraResultSet patch by amorton; reviewed by jbellis for CASSANDRA-2704 jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130201 Files : * /cassandra/branches/cassandra-0.8/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java * /cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java * /cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java * /cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java > provide a typed key value for returned rows via JDBC > > > Key: CASSANDRA-2704 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2704 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Aaron Morton >Assignee: Aaron Morton >Priority: Minor > Attachments: 0001-2704-v2.patch, 0001-2704.patch > > > o.a.c.c.jdbc.CassandraResultSet provides access to column values as Cassandra > type aware via the TypedColumn. But it only provides a byte[] for the key. It > would be handy to have a TypedKey class that does the same but for the key. > This would be handy when doing a multi SELECT as the server only returns rows > we have columns for. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: (was: patch-to-add-4-new-AbstractTypes-v5.txt) > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: (was: patch-to-add -5 -new-AbstractTypes-v3.txt) > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: (was: patch-to-add -5 -new-AbstractTypes.txt) > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: (was: patch-to-add -5 -new-AbstractTypes-v2.txt) > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042343#comment-13042343 ] Rick Shaw commented on CASSANDRA-2530: -- {quote} Isn't date throwing away information when it encodes to long (the time zone)? {quote} I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. {quote} Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic. {quote} Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. {quote} Using compareUnsigned in the boolean compare method seems like overkill. {quote} Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}. > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add > -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, > patch-to-add-4-new-AbstractTypes-v5.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2530: - Attachment: patch-to-add-4-new-AbstractTypes-v5.txt > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add > -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, > patch-to-add-4-new-AbstractTypes-v5.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2673) AssertionError post truncate
[ https://issues.apache.org/jira/browse/CASSANDRA-2673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042317#comment-13042317 ] Hudson commented on CASSANDRA-2673: --- Integrated in Cassandra-0.7 #501 (See [https://builds.apache.org/hudson/job/Cassandra-0.7/501/]) fix truncate/compaction race patch by jbellis; reviewed by slebresne for CASSANDRA-2673 jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130191 Files : * /cassandra/branches/cassandra-0.7/CHANGES.txt * /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java * /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java * /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java * /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/TruncateVerbHandler.java > AssertionError post truncate > > > Key: CASSANDRA-2673 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2673 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.7.0 > Environment: linux 64-bit ubuntu. deb package (datastax). (Random > partitioner) >Reporter: Marko Mikulicic >Assignee: Jonathan Ellis >Priority: Minor > Fix For: 0.7.7, 0.8.1 > > Attachments: 2673.txt > > > I had 3 nodes with about 100G in a CF. I run truncate on that CF from > cassandra-cli. Then I run cleanup for that CF. I saw this exception shortly > after. > INFO [FlushWriter:5] 2011-05-20 02:56:42,699 Memtable.java (line 157) > Writing Memtable-body@1278535630(26722 bytes, 1 operations) > INFO [FlushWriter:5] 2011-05-20 02:56:42,706 Memtable.java (line 172) > Completed flushing /var/lib/cassandra/data/dnet/body-f-1892-Data.db (26915 > bytes) > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,981 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1892 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,982 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1889 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,983 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1890 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,983 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1888 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,984 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1887 > INFO [CompactionExecutor:1] 2011-05-20 03:02:08,724 CompactionManager.java > (line 750) Cleaned up to > /var/lib/cassandra/data/dnet/body-tmp-f-1891-Data.db. 25,629,365,173 to > 25,629,365,173 (~100% of original) bytes for 884,546 keys. Time: 1,165,900ms. > ERROR [CompactionExecutor:1] 2011-05-20 03:02:08,727 > AbstractCassandraDaemon.java (line 114) Fatal exception in thread > Thread[CompactionExecutor:1,1,main] > java.lang.AssertionError > at > org.apache.cassandra.io.sstable.SSTableTracker.replace(SSTableTracker.java:108) > at > org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:1037) > at > org.apache.cassandra.db.CompactionManager.doCleanupCompaction(CompactionManager.java:769) > at > org.apache.cassandra.db.CompactionManager.access$500(CompactionManager.java:56) > at > org.apache.cassandra.db.CompactionManager$2.call(CompactionManager.java:173) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2730) exception generate when using same index names
exception generate when using same index names -- Key: CASSANDRA-2730 URL: https://issues.apache.org/jira/browse/CASSANDRA-2730 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.8 beta 1 Reporter: BAONING WU when using cqlsh tool to generate indexes, for example, suppose we have a column family Tuser, which has two columns: name and state. cqlsh> create index name_key on Tuser(name); cqlsh> create index name_key on Tuser(state); note that name_key is used twice by mistake, then a javax.management.InstanceAlreadyExistsException will be thrown and this exception will prevent cassandra service from starting any more. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2621) sub columns under deleted CF returned
[ https://issues.apache.org/jira/browse/CASSANDRA-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042286#comment-13042286 ] Jonathan Ellis commented on CASSANDRA-2621: --- It sounds like the only bug here is the one described in CASSANDRA-2590, is that right? > sub columns under deleted CF returned > -- > > Key: CASSANDRA-2621 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2621 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.7.5, 0.8.0 beta 2 >Reporter: Aaron Morton >Assignee: Aaron Morton >Priority: Minor > > found when working on CASSANDRA-2590 > In some cases sub columns are not filtered to check if they have a higher > timestamp than and container super column or CF. For example a super col with > two two columns, one with timestamp 0 and the other 5, will be returned with > all columns even if there is a row delete at timestamp 2. > If the QueryFilter is created with a null superColumnName in the QueryPath it > will not filter the sub columns. > IdentityQueryFilter.filterSuperColumn() lets all sub columns through. > NamesQueryFilter.filterSubColumn() and SliceQueryFilter() check that each sub > column is relavent. > I have a fix and am working on some test cases. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2267) stress.java daemon mode
[ https://issues.apache.org/jira/browse/CASSANDRA-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042287#comment-13042287 ] Brandon Williams commented on CASSANDRA-2267: - Excellent! Committed. > stress.java daemon mode > --- > > Key: CASSANDRA-2267 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2267 > Project: Cassandra > Issue Type: Improvement > Components: Contrib >Affects Versions: 0.7.1 >Reporter: Brandon Williams >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2267-v2.patch, CASSANDRA-2267.patch > > > stress.java uses a JVM, but there is no way to warm it up, which skews > results. It would be nice if there was some sort of daemon mode so the JVM > could stay hot, and even better if there was a way to control the daemon > programmatically, perhaps via JMX. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2590) row delete breaks read repair
[ https://issues.apache.org/jira/browse/CASSANDRA-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-2590: -- Comment: was deleted (was: Why do we need to add extra steps to RRR instead of the IQF approach (which means it gets fixed for any local-only queries too)?) > row delete breaks read repair > -- > > Key: CASSANDRA-2590 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2590 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.7.5, 0.8 beta 1 >Reporter: Aaron Morton >Assignee: Aaron Morton >Priority: Minor > Attachments: 0001-2590-v3.patch, > 0001-cf-resolve-test-and-possible-solution-for-read-repai.patch, 2590-v2.txt > > > related to CASSANDRA-2589 > Working at CL ALL can get inconsistent reads after row deletion. Reproduced > on the 0.7 and 0.8 source. > Steps to reproduce: > # two node cluster with rf 2 and HH turned off > # insert rows via cli > # flush both nodes > # shutdown node 1 > # connect to node 2 via cli and delete one row > # bring up node 1 > # connect to node 1 via cli and issue get with CL ALL > # first get returns the deleted row, second get returns zero rows. > RowRepairResolver.resolveSuperSet() resolves a local CF with the old row > columns, and the remote CF which is marked for deletion. CF.resolve() does > not pay attention to the deletion flags and the resolved CF has both > markedForDeletion set and a column with a lower timestamp. The return from > resolveSuperSet() is used as the return for the read without checking if the > cols are relevant. > Also when RowRepairResolver.mabeScheduleRepairs() runs it sends two > mutations. Node 1 is given the row level deletation, and Node 2 is given a > mutation to write the old (and now deleted) column from node 2. I have some > log traces for this if needed. > A quick fix is to check for relevant columns in the RowRepairResolver, will > attach shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130223 - in /cassandra/branches/cassandra-0.8/tools/stress: bin/ src/org/apache/cassandra/stress/ src/org/apache/cassandra/stress/operations/ src/org/apache/cassandra/stress/server/ src/
Author: brandonwilliams Date: Wed Jun 1 16:55:27 2011 New Revision: 1130223 URL: http://svn.apache.org/viewvc?rev=1130223&view=rev Log: stress.java daemon mode. Patch by Pavel Yaskevich, reviewed by brandonwilliams for CASSANDRA-2267 Added: cassandra/branches/cassandra-0.8/tools/stress/bin/stressd (with props) cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/StressAction.java - copied, changed from r1130201, cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/Stress.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/StressServer.java (with props) cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/server/ cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/server/StressThread.java (with props) Modified: cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/Session.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/Stress.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/CounterGetter.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/IndexedRangeSlicer.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/Inserter.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/MultiGetter.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/RangeSlicer.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/operations/Reader.java cassandra/branches/cassandra-0.8/tools/stress/src/org/apache/cassandra/stress/util/Operation.java Added: cassandra/branches/cassandra-0.8/tools/stress/bin/stressd URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/tools/stress/bin/stressd?rev=1130223&view=auto == --- cassandra/branches/cassandra-0.8/tools/stress/bin/stressd (added) +++ cassandra/branches/cassandra-0.8/tools/stress/bin/stressd Wed Jun 1 16:55:27 2011 @@ -0,0 +1,87 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +DESC="Stress Test Daemon" + +if [ "x$CLASSPATH" = "x" ]; then +# Cassandra class files. +if [ ! -d `dirname $0`/../../../build/classes/main ]; then +echo "Unable to locate cassandra class files" >&2 +exit 1 +fi + +# Stress class files. +if [ ! -d `dirname $0`/../build/classes ]; then +echo "Unable to locate stress class files" >&2 +exit 1 +fi + +CLASSPATH=`dirname $0`/../../../build/classes/main +CLASSPATH=$CLASSPATH:`dirname $0`/../../../build/classes/thrift +CLASSPATH=$CLASSPATH:`dirname $0`/../build/classes +for jar in `dirname $0`/../../../lib/*.jar; do +CLASSPATH=$CLASSPATH:$jar +done +fi + +if [ -x $JAVA_HOME/bin/java ]; then +JAVA=$JAVA_HOME/bin/java +else +JAVA=`which java` +fi + +if [ "x$JAVA" = "x" ]; then +echo "Java executable not found (hint: set JAVA_HOME)" >&2 +exit 1 +fi + +case "$1" in + start) +echo "Starting $DESC: " +$JAVA -server -cp $CLASSPATH org.apache.cassandra.stress.StressServer $@ 1> ./stressd.out.log 2> ./stressd.err.log & +echo $! > ./stressd.pid +echo "done." + ;; + + stop) +PID=`cat ./stressd.pid 2> /dev/null` + +if [ "x$PID" = "x" ]; then + echo "$DESC is not running." +else + kill -9 $PID + rm ./stressd.pid + echo "$DESC is stopped." +fi + ;; + + status) +PID=`cat ./stressd.pid 2> /dev/null` + +if [ "x$PID" = "x" ]; then + echo "$DESC is not running." +else + echo "$DESC is running with pid $PID." +fi + ;; + + *) +echo "Usage: $0 start|stop|status [-h ]" + ;; +esac + Propchange: cassandra/branches/cassandra-0.8/tools/stress/bin/stressd -- svn:exe
[jira] [Commented] (CASSANDRA-2590) row delete breaks read repair
[ https://issues.apache.org/jira/browse/CASSANDRA-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042281#comment-13042281 ] Jonathan Ellis commented on CASSANDRA-2590: --- Why do we need to add extra steps to RRR instead of the IQF approach (which means it gets fixed for any local-only queries too)? > row delete breaks read repair > -- > > Key: CASSANDRA-2590 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2590 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.7.5, 0.8 beta 1 >Reporter: Aaron Morton >Assignee: Aaron Morton >Priority: Minor > Attachments: 0001-2590-v3.patch, > 0001-cf-resolve-test-and-possible-solution-for-read-repai.patch, 2590-v2.txt > > > related to CASSANDRA-2589 > Working at CL ALL can get inconsistent reads after row deletion. Reproduced > on the 0.7 and 0.8 source. > Steps to reproduce: > # two node cluster with rf 2 and HH turned off > # insert rows via cli > # flush both nodes > # shutdown node 1 > # connect to node 2 via cli and delete one row > # bring up node 1 > # connect to node 1 via cli and issue get with CL ALL > # first get returns the deleted row, second get returns zero rows. > RowRepairResolver.resolveSuperSet() resolves a local CF with the old row > columns, and the remote CF which is marked for deletion. CF.resolve() does > not pay attention to the deletion flags and the resolved CF has both > markedForDeletion set and a column with a lower timestamp. The return from > resolveSuperSet() is used as the return for the read without checking if the > cols are relevant. > Also when RowRepairResolver.mabeScheduleRepairs() runs it sends two > mutations. Node 1 is given the row level deletation, and Node 2 is given a > mutation to write the old (and now deleted) column from node 2. I have some > log traces for this if needed. > A quick fix is to check for relevant columns in the RowRepairResolver, will > attach shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2635) make cache skipping optional
[ https://issues.apache.org/jira/browse/CASSANDRA-2635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042277#comment-13042277 ] Jonathan Ellis commented on CASSANDRA-2635: --- does setting dontneed on a read (our getDirectScanner) actually cause pre-existing pages to be evicted post-read? in other words, i'm wondering if this should really only change write behavior and leave reads (for compaction) alone. (non-compaction reads are of course not affected either way.) also: suggest page_cache_hinting as the option name. > make cache skipping optional > > > Key: CASSANDRA-2635 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2635 > Project: Cassandra > Issue Type: Improvement >Reporter: Peter Schuller >Assignee: Peter Schuller >Priority: Minor > Attachments: CASSANDRA-2635-075.txt > > > We've applied this patch locally in order to turn of page skipping; not > completely but only for compaction/repair situations where it can be directly > detrimental in the sense of causing data to become cold even though your > entire data set fits in memory. > It's better than completely disabling DONTNEED because the cache skipping > does make sense and has no relevant (that I can see) detrimental effects in > some cases, like when dumping caches. > The patch is against 0.7.5 right now but if the change is desired I can make > a patch for trunk. Also, the name of the configuration option is dubious > since saying 'false' does not actually turn it off completely. I wasn't able > to figure out a good name that conveyed the functionality in a short brief > name however. > A related concern as discussed in CASSANDRA-1902 is that the cache skipping > isn't fsync:ing and so won't work reliably on writes. If the feature is to be > retained that's something to fix in a different ticket. > A question is also whether to retain the default to true or change it to > false. I'm kinda leaning to false since it's detrimental in the "easy" cases > of little data. In "big" cases with lots of data people will have to think > and tweak anyway, so better to put the burden on that end. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042274#comment-13042274 ] Pavel Yaskevich commented on CASSANDRA-2530: +1 on changes in grammar. > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add > -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042271#comment-13042271 ] Jonathan Ellis commented on CASSANDRA-2530: --- Isn't date throwing away information when it encodes to long (the time zone)? Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic. Using compareUnsigned in the boolean compare method seems like overkill. Otherwise looks fine to me. > Additional AbstractType data type definitions to enrich CQL > --- > > Key: CASSANDRA-2530 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2530 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Priority: Trivial > Labels: cql > Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add > -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, > patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt > > > Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, > DoubleType. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2267) stress.java daemon mode
[ https://issues.apache.org/jira/browse/CASSANDRA-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-2267: --- Attachment: CASSANDRA-2267-v2.patch -h option to the ./bin/stressd when you kill client with Ctrl-C it will send a signal to the server to cancel running operation associated with that client. > stress.java daemon mode > --- > > Key: CASSANDRA-2267 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2267 > Project: Cassandra > Issue Type: Improvement > Components: Contrib >Affects Versions: 0.7.1 >Reporter: Brandon Williams >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2267-v2.patch, CASSANDRA-2267.patch > > > stress.java uses a JVM, but there is no way to warm it up, which skews > results. It would be nice if there was some sort of daemon mode so the JVM > could stay hot, and even better if there was a way to control the daemon > programmatically, perhaps via JMX. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2654) Work around native heap leak in sun.nio.ch.Util affecting IncomingTcpConnection
[ https://issues.apache.org/jira/browse/CASSANDRA-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042268#comment-13042268 ] Sylvain Lebresne commented on CASSANDRA-2654: - looks good, +1 > Work around native heap leak in sun.nio.ch.Util affecting > IncomingTcpConnection > --- > > Key: CASSANDRA-2654 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2654 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.6.13, 0.7.5, 0.8.0 beta 2 > Environment: OpenJDK Runtime Environment (IcedTea6 1.9.7) > (6b20-1.9.7-0ubuntu1~10.04.1) > OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) > Also observed on Sun/Oracle JDK. Probably platform- and os-independent. >Reporter: Hannes Schmidt > Fix For: 0.6.12 > > Attachments: 2654-v2.txt, 2654-v3.txt, 2654-v4-0.7.txt, 2654-v4.txt, > chunking.diff > > > NIO's leaky, per-thread caching of direct buffers in combination with > IncomingTcpConnection's eager buffering of messages leads to leakage of large > amounts of native heap. Details in [1]. More on the root cause in [2]. Even > though it doesn't fix the leak, attached patch has been found to alleviate > the problem by keeping the size of each direct buffer modest. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-1608) Redesigned Compaction
[ https://issues.apache.org/jira/browse/CASSANDRA-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042260#comment-13042260 ] Jonathan Ellis commented on CASSANDRA-1608: --- bq. This is probably the best option, create a new component type: METADATA_STORE which will hold namespaced key/value pairs on a per-sstable basis We've been sticking metadata into the statistics component, fwiw. It's easier to leave the filename the same, but it's definitely not just statistics anymore. > Redesigned Compaction > - > > Key: CASSANDRA-1608 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1608 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Chris Goffinet > > After seeing the I/O issues in CASSANDRA-1470, I've been doing some more > thinking on this subject that I wanted to lay out. > I propose we redo the concept of how compaction works in Cassandra. At the > moment, compaction is kicked off based on a write access pattern, not read > access pattern. In most cases, you want the opposite. You want to be able to > track how well each SSTable is performing in the system. If we were to keep > statistics in-memory of each SSTable, prioritize them based on most accessed, > and bloom filter hit/miss ratios, we could intelligently group sstables that > are being read most often and schedule them for compaction. We could also > schedule lower priority maintenance on SSTable's not often accessed. > I also propose we limit the size of each SSTable to a fix sized, that gives > us the ability to better utilize our bloom filters in a predictable manner. > At the moment after a certain size, the bloom filters become less reliable. > This would also allow us to group data most accessed. Currently the size of > an SSTable can grow to a point where large portions of the data might not > actually be accessed as often. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2704) provide a typed key value for returned rows via JDBC
[ https://issues.apache.org/jira/browse/CASSANDRA-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042258#comment-13042258 ] Jonathan Ellis commented on CASSANDRA-2704: --- committed > provide a typed key value for returned rows via JDBC > > > Key: CASSANDRA-2704 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2704 > Project: Cassandra > Issue Type: Improvement > Components: Core >Affects Versions: 0.8.0 beta 2 >Reporter: Aaron Morton >Assignee: Aaron Morton >Priority: Minor > Attachments: 0001-2704-v2.patch, 0001-2704.patch > > > o.a.c.c.jdbc.CassandraResultSet provides access to column values as Cassandra > type aware via the TypedColumn. But it only provides a byte[] for the key. It > would be handy to have a TypedKey class that does the same but for the key. > This would be handy when doing a multi SELECT as the server only returns rows > we have columns for. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130201 - in /cassandra/branches/cassandra-0.8/drivers/java: src/org/apache/cassandra/cql/jdbc/ test/org/apache/cassandra/cql/
Author: jbellis Date: Wed Jun 1 16:06:58 2011 New Revision: 1130201 URL: http://svn.apache.org/viewvc?rev=1130201&view=rev Log: add key-as-TypedColumn to CassandraResultSet patch by amorton; reviewed by jbellis for CASSANDRA-2704 Modified: cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java cassandra/branches/cassandra-0.8/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java Modified: cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java?rev=1130201&r1=1130200&r2=1130201&view=diff == --- cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java (original) +++ cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java Wed Jun 1 16:06:58 2011 @@ -48,6 +48,7 @@ public class CResultSet extends Abstract // the current row key when iterating through results. private byte[] curRowKey = null; +private TypedColumn typedCurRowKey = null; /** The values. */ private List values = new ArrayList(); @@ -78,6 +79,11 @@ public class CResultSet extends Abstract return curRowKey; } +public TypedColumn getTypedKey() +{ +return typedCurRowKey; +} + public TypedColumn getColumn(int i) { return values.get(i); @@ -379,6 +385,8 @@ public class CResultSet extends Abstract CqlRow row = rSetIter.next(); rowNumber++; curRowKey = row.getKey(); +typedCurRowKey = decoder.makeKeyColumn(keyspace, columnFamily, curRowKey); + List cols = row.getColumns(); for (Column col : cols) { Modified: cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java?rev=1130201&r1=1130200&r2=1130201&view=diff == --- cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java (original) +++ cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java Wed Jun 1 16:06:58 2011 @@ -30,6 +30,7 @@ public interface CassandraResultSet exte * @return the current row key */ public byte[] getKey(); +public TypedColumn getTypedKey(); /** @return a BigInteger value for the given column offset*/ public BigInteger getBigInteger(int i); Modified: cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java?rev=1130201&r1=1130200&r2=1130201&view=diff == --- cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java (original) +++ cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java Wed Jun 1 16:06:58 2011 @@ -128,4 +128,14 @@ class ColumnDecoder getNameType(keyspace, columnFamily, column.name), getValueType(keyspace, columnFamily, column.name)); } + +/** constructs a typed column to hold the key */ +public TypedColumn makeKeyColumn(String keyspace, String columnFamily, byte[] key) +{ +CFMetaData md = metadata.get(String.format("%s.%s", keyspace, columnFamily)); +Column column = new Column(md.getKeyName()).setValue(key).setTimestamp(-1); +return new TypedColumn(column, + getNameType(keyspace, columnFamily, md.getKeyName()), + getValueType(keyspace, columnFamily, md.getKeyName())); +} } Modified: cassandra/branches/cassandra-0.8/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java?rev=1130201&r1=1130200&r2=1130201&view=diff == --- cassandra/branches/cassandra-0.8/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java (original) +++ cassandra/branches/cassandra-0.8/drivers/java/test/org/ap
[jira] [Commented] (CASSANDRA-2496) Gossip should handle 'dead' states
[ https://issues.apache.org/jira/browse/CASSANDRA-2496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042254#comment-13042254 ] Brandon Williams commented on CASSANDRA-2496: - Some explanation of what changed and why it was necessary: Consider nodes A through D. D is partitioned, and C is dead and needs to be removed. A removetoken will be issued to A for this. In the current way we do things, A will modify it's own state by appending information to its status indicating that it will be removing C. B will see this, re-replicate as needed, then report to A that is is done. The problem however, is that since A modified its own state, A is also free to wipe that state out, either by restarting, or simple remove another token, because there's only space for one. If A reboots and then D's partition heals, D will never know C was removed. Worse, it will still have state for C that neither A nor B do, and so it will repopulate the ring with C again. This patch changes this by instead having A sleep for RING_DELAY to make sure the generation for C is stable, and then it modifies C's state to indicate it is being removed, just as if C itself had done this. It also appends some extra state to indicate that A will be the removal coordinator. The others nodes see this, re-replicate and report back to A, which then modifies C's state once more to indicate it is completely removed. At this point, it doesn't matter if A dies completely and D's partition heals, since the state is stored in C's gossip information. If A reboots, it will be able to get the correct state information from B, or any other node. If A fails while the other nodes are re-replicating, a new removetoken can be started elsewhere, or in the case of other replicas being down preventing removetoken from completing, a removetoken force will remove the node and then repair can be run to restore the replica count. > Gossip should handle 'dead' states > -- > > Key: CASSANDRA-2496 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2496 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Brandon Williams >Assignee: Brandon Williams > Attachments: 0001-Rework-token-removal-process.txt, > 0002-add-2115-back.txt > > > For background, see CASSANDRA-2371 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130200 - in /cassandra/branches/cassandra-0.8: ./ doc/cql/ src/java/org/apache/cassandra/cql/ test/system/
Author: jbellis Date: Wed Jun 1 15:58:44 2011 New Revision: 1130200 URL: http://svn.apache.org/viewvc?rev=1130200&view=rev Log: add CQL ALTER TABLE patch by pyaskevich; reviewed by jbellis for CASSANDRA-1709 Added: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java Modified: cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/doc/cql/CQL.textile cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/QueryProcessor.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/StatementType.java cassandra/branches/cassandra-0.8/test/system/test_cql.py Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130200&r1=1130199&r2=1130200&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jun 1 15:58:44 2011 @@ -32,6 +32,7 @@ * Fixed rows being cached if they do not exist (CASSANDRA-2723) * fix truncate/compaction race (CASSANDRA-2673) * improve CQL JDBC spec compliance (CASSANDRA-2720) + * add CQL ALTER TABLE (CASSANDRA-1709) 0.8.0-final Modified: cassandra/branches/cassandra-0.8/doc/cql/CQL.textile URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/doc/cql/CQL.textile?rev=1130200&r1=1130199&r2=1130200&view=diff == --- cassandra/branches/cassandra-0.8/doc/cql/CQL.textile (original) +++ cassandra/branches/cassandra-0.8/doc/cql/CQL.textile Wed Jun 1 15:58:44 2011 @@ -69,6 +69,17 @@ SELECT ... WHERE [LIMIT N] ... Limiting the number of rows returned can be achieved by adding the @LIMIT@ option to a @SELECT@ expression. @LIMIT@ defaults to 10,000 when left unset. +h2. ALTER TABLE + +_Synopsis:_ + +bc. +ALTER TABLE ADD ; +ALTER TABLE ALTER TYPE ; +ALTER TABLE DROP ; + +An @ALTER@ is used to manipulate with ColumnFamily columns. It allows you to add new columns, alter and drop existing columns. No results are returned. + h2. INSERT _Synopsis:_ Added: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java?rev=1130200&view=auto == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java (added) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/AlterTableStatement.java Wed Jun 1 15:58:44 2011 @@ -0,0 +1,122 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.cassandra.cql; + +import org.apache.cassandra.config.CFMetaData; +import org.apache.cassandra.config.ColumnDefinition; +import org.apache.cassandra.config.ConfigurationException; +import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.db.marshal.TypeParser; +import org.apache.cassandra.db.migration.avro.CfDef; +import org.apache.cassandra.db.migration.avro.ColumnDef; +import org.apache.cassandra.thrift.InvalidRequestException; + +import java.nio.ByteBuffer; + +public class AlterTableStatement +{ +public static enum OperationType +{ +ADD, ALTER, DROP +} + +public final OperationType oType; +public final String columnFamily, columnName, validator; + +public AlterTableStatement(String columnFamily, OperationType type, String columnName) +{ +this(columnFamily, type, columnName, null); +} + +public AlterTableStatement(String columnFamily, OperationType type, String columnName, String validator) +{ +this.columnFamily = columnFamily; +this.oType = type; +this.columnName = columnName; +this.validator = CreateColumnFa
svn commit: r1130197 - in /cassandra/branches/cassandra-0.8: CHANGES.txt drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java
Author: jbellis Date: Wed Jun 1 15:52:56 2011 New Revision: 1130197 URL: http://svn.apache.org/viewvc?rev=1130197&view=rev Log: improve CQL JDBCspec compliance patch by Rick Shaw; reviewed by Yuki Morishita and jbellis Modified: cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130197&r1=1130196&r2=1130197&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jun 1 15:52:56 2011 @@ -31,6 +31,7 @@ * Added statusthrift to nodetool to report if thrift server is running (CASSANDRA-2722) * Fixed rows being cached if they do not exist (CASSANDRA-2723) * fix truncate/compaction race (CASSANDRA-2673) + * improve CQL JDBC spec compliance (CASSANDRA-2720) 0.8.0-final Modified: cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java?rev=1130197&r1=1130196&r2=1130197&view=diff == --- cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java (original) +++ cassandra/branches/cassandra-0.8/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java Wed Jun 1 15:52:56 2011 @@ -28,8 +28,10 @@ import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.NClob; import java.sql.PreparedStatement; +import java.sql.ResultSet; import java.sql.SQLClientInfoException; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; import java.sql.SQLWarning; import java.sql.SQLXML; import java.sql.Savepoint; @@ -52,10 +54,13 @@ import org.apache.thrift.transport.TTran */ class CassandraConnection implements Connection { - -/** The cassandra con. */ +private Properties clientInfo = new Properties(); + +/** + * The cassandra con. + */ private org.apache.cassandra.cql.jdbc.Connection cassandraCon; - + /** * Instantiates a new cassandra connection. * @@ -77,8 +82,7 @@ class CassandraConnection implements Con final int host_backwardIdx = host_port.indexOf('/'); final String port = host_port.substring(host_colonIdx + 1, host_backwardIdx); final String keyspace = host_port.substring(host_backwardIdx + 1); -cassandraCon = new org.apache.cassandra.cql.jdbc.Connection(hostName, Integer.valueOf(port), userName, - password); +cassandraCon = new org.apache.cassandra.cql.jdbc.Connection(hostName, Integer.valueOf(port), userName, password); final String useQ = "USE " + keyspace; cassandraCon.execute(useQ); } @@ -120,7 +124,7 @@ class CassandraConnection implements Con } } - + /** * @param arg0 * @return @@ -128,10 +132,10 @@ class CassandraConnection implements Con */ public boolean isWrapperFor(Class arg0) throws SQLException { -throw new UnsupportedOperationException("method not supported"); +throw new SQLException("no object is found that implements this interface"); } - + /** * @param * @param arg0 @@ -140,17 +144,19 @@ class CassandraConnection implements Con */ public T unwrap(Class arg0) throws SQLException { -throw new UnsupportedOperationException("method not supported"); +throw new SQLException("no object is found that implements this interface"); } - /** * @throws SQLException */ public void clearWarnings() throws SQLException { -throw new UnsupportedOperationException("method not supported"); +// This implementation does not support the collection of warnings so clearing is a no-op +// but it is still an exception to call this on a closed connection. +if (isClosed()) +throw new SQLException("this method was called on a closed Connection"); } /** @@ -172,7 +178,7 @@ class CassandraConnection implements Con */ public void commit() throws SQLException { -throw new UnsupportedOperationException("method not supported"); +throw new SQLException("The Cassandra Implementation is always in auto-commit mode."); } @@ -184,7 +190,7 @@ class CassandraConnection implements Con */ public Array createArrayOf(String arg0, Objec
[jira] [Commented] (CASSANDRA-2725) Update the JDBC semantics contained in the class AbstractResultSet
[ https://issues.apache.org/jira/browse/CASSANDRA-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042245#comment-13042245 ] Jonathan Ellis commented on CASSANDRA-2725: --- Sounds good. (Typically if there is agreement on the direction to take it's not necessary to post patches-in-progress.) > Update the JDBC semantics contained in the class AbstractResultSet > -- > > Key: CASSANDRA-2725 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2725 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-JDBC-AbstractResultSet-v1.txt > > > The {{AbstractResultSet}} cleverly isolates all the methods that are not > planned to be implemented in the next release of of the JDBC Result Set > implemented by the class {{CResultSet}}. This improvement will tighten the > JDBC semantics for this set of methods. > This improvement is related to > [CASSANDRA-2720|https://issues.apache.org/jira/browse/CASSANDRA-2720] but is > not blocked by it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130193 - in /cassandra/branches/cassandra-0.8: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/db/
Author: jbellis Date: Wed Jun 1 15:39:29 2011 New Revision: 1130193 URL: http://svn.apache.org/viewvc?rev=1130193&view=rev Log: merge from 0.7 Modified: cassandra/branches/cassandra-0.8/ (props changed) cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/contrib/ (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java (props changed) cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java (props changed) cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/CompactionManager.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/Table.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/TruncateVerbHandler.java Propchange: cassandra/branches/cassandra-0.8/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jun 1 15:39:29 2011 @@ -1,5 +1,5 @@ /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000 -/cassandra/branches/cassandra-0.7:1026516-1128347,1129151 +/cassandra/branches/cassandra-0.7:1026516-1128347,1129151,1130191 /cassandra/branches/cassandra-0.7.0:1053690-1055654 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041 /cassandra/branches/cassandra-0.8.0:1125021-1127636,1129154 Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130193&r1=1130192&r2=1130193&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jun 1 15:39:29 2011 @@ -30,6 +30,8 @@ * Added support for making bootstrap retry if nodes flap (CASSANDRA-2644) * Added statusthrift to nodetool to report if thrift server is running (CASSANDRA-2722) * Fixed rows being cached if they do not exist (CASSANDRA-2723) + * fix truncate/compaction race (CASSANDRA-2673) + 0.8.0-final * fix CQL grammar warning and cqlsh regression from CASSANDRA-2622 Propchange: cassandra/branches/cassandra-0.8/contrib/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jun 1 15:39:29 2011 @@ -1,5 +1,5 @@ /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009 -/cassandra/branches/cassandra-0.7/contrib:1026516-1128347,1129151 +/cassandra/branches/cassandra-0.7/contrib:1026516-1128347,1129151,1130191 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1127636,1129154 Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jun 1 15:39:29 2011 @@ -1,5 +1,5 @@ /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000 -/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1128347,1129151 +/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1128347,1129151,1130191 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654 /cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125041 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1127636,1129154 Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jun 1 15:39:29 2011 @@ -1,5 +1,5 @@ /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000 -/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/or
svn commit: r1130191 - in /cassandra/branches/cassandra-0.7: ./ src/java/org/apache/cassandra/db/
Author: jbellis Date: Wed Jun 1 15:34:57 2011 New Revision: 1130191 URL: http://svn.apache.org/viewvc?rev=1130191&view=rev Log: fix truncate/compaction race patch by jbellis; reviewed by slebresne for CASSANDRA-2673 Modified: cassandra/branches/cassandra-0.7/CHANGES.txt cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/TruncateVerbHandler.java Modified: cassandra/branches/cassandra-0.7/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1130191&r1=1130190&r2=1130191&view=diff == --- cassandra/branches/cassandra-0.7/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Jun 1 15:34:57 2011 @@ -12,6 +12,7 @@ * close scrub file handles (CASSANDRA-2669) * throttle migration replay (CASSANDRA-2714) * optimize column serializer creation (CASSANDRA-2716) + * fix truncate/compaction race (CASSANDRA-2673) 0.7.6 Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1130191&r1=1130190&r2=1130191&view=diff == --- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original) +++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed Jun 1 15:34:57 2011 @@ -1887,8 +1887,12 @@ public class ColumnFamilyStore implement */ public Future truncate() throws IOException { -// snapshot will also flush, but we want to truncate the most possible, and anything in a flush written -// after truncateAt won't be truncated. +// We have two goals here: +// - truncate should delete everything written before truncate was invoked +// - but not delete anything that isn't part of the snapshot we create. +// We accomplish this by first flushing manually, then snapshotting, and +// recording the timestamp IN BETWEEN those actions. Any sstables created +// with this timestamp or greater time, will not be marked for delete. try { forceBlockingFlush(); @@ -1897,33 +1901,20 @@ public class ColumnFamilyStore implement { throw new RuntimeException(e); } - -final long truncatedAt = System.currentTimeMillis(); -snapshot(Table.getTimestampedSnapshotName("before-truncate")); - -Runnable runnable = new WrappedRunnable() +// sleep a little to make sure that our truncatedAt comes after any sstable +// that was part of the flushed we forced; otherwise on a tie, it won't get deleted. +try { -public void runMayThrow() throws InterruptedException, IOException -{ -// putting markCompacted on the commitlogUpdater thread ensures it will run -// after any compactions that were in progress when truncate was called, are finished -for (ColumnFamilyStore cfs : concatWithIndexes()) -{ -List truncatedSSTables = new ArrayList(); -for (SSTableReader sstable : cfs.getSSTables()) -{ -if (!sstable.newSince(truncatedAt)) -truncatedSSTables.add(sstable); -} -cfs.markCompacted(truncatedSSTables); -} - -// Invalidate row cache -invalidateRowCache(); -} -}; +Thread.sleep(100); +} +catch (InterruptedException e) +{ +throw new AssertionError(e); +} +long truncatedAt = System.currentTimeMillis(); +snapshot(Table.getTimestampedSnapshotName("before-truncate")); -return postFlushExecutor.submit(runnable); +return CompactionManager.instance.submitTruncate(this, truncatedAt); } // if this errors out, we are in a world of hurt. Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1130191&r1=1130190&r2=1130191&view=diff == --- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/CompactionManager.java (original) +++ cassandra/branches/cassandra-0.7/src/j
[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal
[ https://issues.apache.org/jira/browse/CASSANDRA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042233#comment-13042233 ] donal zang commented on CASSANDRA-2231: --- Thanks sylvain ! > Add CompositeType comparer to the comparers provided in > org.apache.cassandra.db.marshal > --- > > Key: CASSANDRA-2231 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2231 > Project: Cassandra > Issue Type: New Feature > Components: Contrib >Reporter: Ed Anuff >Assignee: Sylvain Lebresne >Priority: Minor > Fix For: 0.8.1 > > Attachments: > 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, > 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, > CompositeType-and-DynamicCompositeType.patch, > edanuff-CassandraCompositeType-1e253c4.zip > > > CompositeType is a custom comparer that makes it possible to create > comparable composite values out of the basic types that Cassandra currently > supports, such as Long, UUID, etc. This is very useful in both the creation > of custom inverted indexes using columns in a skinny row, where each column > name is a composite value, and also when using Cassandra's built-in secondary > index support, where it can be used to encode the values in the columns that > Cassandra indexes. One scenario for the usage of these is documented here: > http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html. Source for > contribution is attached and has been previously maintained on github here: > https://github.com/edanuff/CassandraCompositeType -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal
[ https://issues.apache.org/jira/browse/CASSANDRA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042217#comment-13042217 ] donal zang edited comment on CASSANDRA-2231 at 6/1/11 3:16 PM: --- Hi, forgive me if the question is naive. I'm using the release 0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and when I apply the patch , it can't find the file TypeParser.java : {quote} $patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch patching file src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java can't find file to patch at input line 694 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java b/src/java/org/apache/cassandra/db/marshal/TypeParser.java |index a3fabc5..0b21042 100644 |--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java |+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java -- File to patch: {quote} So, am I missing something? was (Author: donal): Hi, forgive me if the question is naive. I'm using the release 0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and when I apply the patch , it can't find the file TypeParser.java : $patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch patching file src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java can't find file to patch at input line 694 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java b/src/java/org/apache/cassandra/db/marshal/TypeParser.java |index a3fabc5..0b21042 100644 |--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java |+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java -- File to patch: So, am I missing something? > Add CompositeType comparer to the comparers provided in > org.apache.cassandra.db.marshal > --- > > Key: CASSANDRA-2231 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2231 > Project: Cassandra > Issue Type: New Feature > Components: Contrib >Reporter: Ed Anuff >Assignee: Sylvain Lebresne >Priority: Minor > Fix For: 0.8.1 > > Attachments: > 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, > 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, > CompositeType-and-DynamicCompositeType.patch, > edanuff-CassandraCompositeType-1e253c4.zip > > > CompositeType is a custom comparer that makes it possible to create > comparable composite values out of the basic types that Cassandra currently > supports, such as Long, UUID, etc. This is very useful in both the creation > of custom inverted indexes using columns in a skinny row, where each column > name is a composite value, and also when using Cassandra's built-in secondary > index support, where it can be used to encode the values in the columns that > Cassandra indexes. One scenario for the usage of these is documented here: > http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html. Source for > contribution is attached and has been previously maintained on github here: > https://github.com/edanuff/CassandraCompositeType -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2617) Add "DROP INDEX" command to CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042223#comment-13042223 ] Jonathan Ellis commented on CASSANDRA-2617: --- bq. DROP INDEX ON . This approach is fine for the cli (since we expect to not need it much longer) but we need to be more forward-thinking for CQL. The reason that relational databases all do DROP based on index name is, indexes can cover multiple columns so the by-column approach doesn't generalize. But, I understand the motivation here, because bq. DROP INDEX making this the only option right now would suck because we don't auto-generate an index name when none is provided. (We sort of do, to create a file name for the sstables, but this is not interchangable with an actual index name.) I think the right thing to do here is to do some deeper surgery, and create index names when none is provided so that can be the only thing we check for DROP. The default index name should be comparator.getString(info.name) + "_idx" *when creating new indexes.* When inflating old ones in CFMD.inflate, we should default them to ByteBufferUtil.bytesToHex(info.name) to preserve compatibility in CFMD.indexColumnFamilyName (see also the TODO there). > Add "DROP INDEX" command to CQL > --- > > Key: CASSANDRA-2617 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2617 > Project: Cassandra > Issue Type: New Feature > Components: API, Core >Reporter: Pavel Yaskevich >Assignee: Pavel Yaskevich > Fix For: 0.8.1 > > Attachments: CASSANDRA-2617.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal
[ https://issues.apache.org/jira/browse/CASSANDRA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1304#comment-1304 ] Sylvain Lebresne commented on CASSANDRA-2231: - You'd have to apply the patch on CASSANDRA-2355 first. > Add CompositeType comparer to the comparers provided in > org.apache.cassandra.db.marshal > --- > > Key: CASSANDRA-2231 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2231 > Project: Cassandra > Issue Type: New Feature > Components: Contrib >Reporter: Ed Anuff >Assignee: Sylvain Lebresne >Priority: Minor > Fix For: 0.8.1 > > Attachments: > 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, > 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, > CompositeType-and-DynamicCompositeType.patch, > edanuff-CassandraCompositeType-1e253c4.zip > > > CompositeType is a custom comparer that makes it possible to create > comparable composite values out of the basic types that Cassandra currently > supports, such as Long, UUID, etc. This is very useful in both the creation > of custom inverted indexes using columns in a skinny row, where each column > name is a composite value, and also when using Cassandra's built-in secondary > index support, where it can be used to encode the values in the columns that > Cassandra indexes. One scenario for the usage of these is documented here: > http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html. Source for > contribution is attached and has been previously maintained on github here: > https://github.com/edanuff/CassandraCompositeType -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130183 - in /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra: config/CFMetaData.java db/ColumnFamilyStore.java thrift/ThriftValidation.java
Author: jbellis Date: Wed Jun 1 15:11:28 2011 New Revision: 1130183 URL: http://svn.apache.org/viewvc?rev=1130183&view=rev Log: rename and improve comments for CFMD.indexColumnFamilyName Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1130183&r1=1130182&r2=1130183&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java Wed Jun 1 15:11:28 2011 @@ -257,7 +257,7 @@ public final class CFMetaData public static CFMetaData newIndexMetadata(CFMetaData parent, ColumnDefinition info, AbstractType columnComparator) { -return new CFMetaData(parent.ksName, parent.indexName(info), ColumnFamilyType.Standard, columnComparator, null) +return new CFMetaData(parent.ksName, parent.indexColumnFamilyName(info), ColumnFamilyType.Standard, columnComparator, null) .keyCacheSize(0.0) .readRepairChance(0.0) .gcGraceSeconds(parent.gcGraceSeconds) @@ -305,11 +305,13 @@ public final class CFMetaData cfIdMap.remove(new Pair(cfm.ksName, cfm.cfName)); } -/** convention for nameing secondary indexes. */ -public String indexName(ColumnDefinition info) +/** + * generate a column family name for an index corresponding to the given column. + * This is NOT the same as the index's name! This is only used in sstable filenames and is not exposed to users. + */ +public String indexColumnFamilyName(ColumnDefinition info) { -// what we should have done: -// return cfName + "." + (info.getIndexName() == null ? comparator.getString(info.name) + "_idx" : info.getIndexName()); +// TODO simplify this when info.index_name is guaranteed to be set return cfName + "." + (info.getIndexName() == null ? ByteBufferUtil.bytesToHex(info.name) : info.getIndexName()); } Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1130183&r1=1130182&r2=1130183&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed Jun 1 15:11:28 2011 @@ -511,7 +511,7 @@ public class ColumnFamilyStore implement if (cfm != null) // secondary indexes aren't stored in DD. { for (ColumnDefinition def : cfm.getColumn_metadata().values()) -scrubDataDirectories(table, cfm.indexName(def)); +scrubDataDirectories(table, cfm.indexColumnFamilyName(def)); } } Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java?rev=1130183&r1=1130182&r2=1130183&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java Wed Jun 1 15:11:28 2011 @@ -555,7 +555,7 @@ public class ThriftValidation { // Ensure that given idx_names and auto_generated idx_names cannot collide CFMetaData cfm = CFMetaData.fromThrift(cf_def); -String idxName = cfm.indexName(ColumnDefinition.fromColumnDef(c)); +String idxName = cfm.indexColumnFamilyName(ColumnDefinition.fromColumnDef(c)); if (indexNames.contains(idxName)) throw new InvalidRequestException("Duplicate index names " + idxName); indexNames.add(idxName);
[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal
[ https://issues.apache.org/jira/browse/CASSANDRA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042217#comment-13042217 ] donal zang commented on CASSANDRA-2231: --- Hi, forgive me if the question is naive. I'm using the release 0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and when I apply the patch , it can't find the file TypeParser.java : $patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch patching file src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java can't find file to patch at input line 694 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java b/src/java/org/apache/cassandra/db/marshal/TypeParser.java |index a3fabc5..0b21042 100644 |--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java |+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java -- File to patch: So, am I missing something? > Add CompositeType comparer to the comparers provided in > org.apache.cassandra.db.marshal > --- > > Key: CASSANDRA-2231 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2231 > Project: Cassandra > Issue Type: New Feature > Components: Contrib >Reporter: Ed Anuff >Assignee: Sylvain Lebresne >Priority: Minor > Fix For: 0.8.1 > > Attachments: > 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, > 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, > 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, > CompositeType-and-DynamicCompositeType.patch, > edanuff-CassandraCompositeType-1e253c4.zip > > > CompositeType is a custom comparer that makes it possible to create > comparable composite values out of the basic types that Cassandra currently > supports, such as Long, UUID, etc. This is very useful in both the creation > of custom inverted indexes using columns in a skinny row, where each column > name is a composite value, and also when using Cassandra's built-in secondary > index support, where it can be used to encode the values in the columns that > Cassandra indexes. One scenario for the usage of these is documented here: > http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html. Source for > contribution is attached and has been previously maintained on github here: > https://github.com/edanuff/CassandraCompositeType -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-1709) CQL keyspace and column family management
[ https://issues.apache.org/jira/browse/CASSANDRA-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-1709: --- Attachment: CASSANDRA-1709-alter-table-statement-v2.patch rebased with the latest cassandra-0.8 > CQL keyspace and column family management > - > > Key: CASSANDRA-1709 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1709 > Project: Cassandra > Issue Type: Sub-task > Components: API >Affects Versions: 0.8 beta 1 >Reporter: Eric Evans >Assignee: Pavel Yaskevich >Priority: Minor > Labels: cql > Fix For: 0.8.1 > > Attachments: CASSANDRA-1709-alter-table-statement-v2.patch, > CASSANDRA-1709-alter-table-statement.patch, > v1-0001-CASSANDRA-1709-CQL-DROP-implementations.txt, > v1-0002-system-tests-for-CQL-DROPs.txt, v1-0003-updated-doco-for-CQL-DROPs.txt > > Original Estimate: 0h > Remaining Estimate: 0h > > CQL specification and implementation for schema management. > This corresponds to the following RPC methods: > * system_add_column_family() > * system_add_keyspace() > * system_drop_keyspace() > * system_update_keyspace() > * system_update_columnfamily() > *Update: 2011-04-11* > All that remains for the Cassandra 1.0 timeline is {{ALTER}} (scroll down for > the agreed upon specification). {{CREATE}} and {{DROP}} are complete. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130176 - /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java
Author: jbellis Date: Wed Jun 1 15:03:30 2011 New Revision: 1130176 URL: http://svn.apache.org/viewvc?rev=1130176&view=rev Log: unbreak indexName compatibility Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1130176&r1=1130175&r2=1130176&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java Wed Jun 1 15:03:30 2011 @@ -308,7 +308,9 @@ public final class CFMetaData /** convention for nameing secondary indexes. */ public String indexName(ColumnDefinition info) { -return cfName + "." + (info.getIndexName() == null ? comparator.getString(info.name) + "_idx" : info.getIndexName()); +// what we should have done: +// return cfName + "." + (info.getIndexName() == null ? comparator.getString(info.name) + "_idx" : info.getIndexName()); +return cfName + "." + (info.getIndexName() == null ? ByteBufferUtil.bytesToHex(info.name) : info.getIndexName()); } public org.apache.cassandra.db.migration.avro.CfDef deflate()
[jira] [Updated] (CASSANDRA-2720) The current implementation of CassandraConnection does not always follow documented semantics for a JDBC Connection interface
[ https://issues.apache.org/jira/browse/CASSANDRA-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Shaw updated CASSANDRA-2720: - Attachment: Cleanup-semantics-for-a-JDBC-Connection-v2.txt > The current implementation of CassandraConnection does not always follow > documented semantics for a JDBC Connection interface > - > > Key: CASSANDRA-2720 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2720 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, drivers, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-a JDBC-Connection-v1.txt, > Cleanup-semantics-for-a-JDBC-Connection-v2.txt > > > While the current implementation of many of the classes in the JDBC driver > implementation are practical to get the driver to work they do not always > obey the documented semantics for the associated interfaces. I am proposing > making a pass over the involved implementation members to start the > "tightening" process that will need to happen to use this driver in other > tools an programs that expect stricter adherence than is currently present. > Broad areas of attention are: > - Use of {{SQLFeatureNotSupportedException}} not > {{UnsupportedOperationException}} for methods that The Cassandra > Implementation does not support. > - Checking in appropriate methods for the prescribed throwing of > {{SQLException}} if the method is called on a closed connection. > - providing method implementations for all methods that are not optional even > it it is to return NULL (as prescribed in the Interface description.) > I will cut additional JIRA tickets for other components in the suite. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130170 - in /cassandra/branches/cassandra-0.8: ./ doc/cql/ src/java/org/apache/cassandra/cql/ test/system/
Author: jbellis Date: Wed Jun 1 14:51:15 2011 New Revision: 1130170 URL: http://svn.apache.org/viewvc?rev=1130170&view=rev Log: revert r1130132 Modified: cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/doc/cql/CQL.textile cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/QueryProcessor.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/StatementType.java cassandra/branches/cassandra-0.8/test/system/test_cql.py Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130170&r1=1130169&r2=1130170&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jun 1 14:51:15 2011 @@ -30,8 +30,6 @@ * Added support for making bootstrap retry if nodes flap (CASSANDRA-2644) * Added statusthrift to nodetool to report if thrift server is running (CASSANDRA-2722) * Fixed rows being cached if they do not exist (CASSANDRA-2723) - * Add CQL ALTER TABLE (CASSANDRA-1709) - 0.8.0-final * fix CQL grammar warning and cqlsh regression from CASSANDRA-2622 Modified: cassandra/branches/cassandra-0.8/doc/cql/CQL.textile URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/doc/cql/CQL.textile?rev=1130170&r1=1130169&r2=1130170&view=diff == --- cassandra/branches/cassandra-0.8/doc/cql/CQL.textile (original) +++ cassandra/branches/cassandra-0.8/doc/cql/CQL.textile Wed Jun 1 14:51:15 2011 @@ -69,21 +69,6 @@ SELECT ... WHERE [LIMIT N] ... Limiting the number of rows returned can be achieved by adding the @LIMIT@ option to a @SELECT@ expression. @LIMIT@ defaults to 10,000 when left unset. -h2. ALTER TABLE - -_Synopsis:_ - -bc. -ALTER TABLE ADD ; -ALTER TABLE ALTER TYPE ; -ALTER TABLE DROP ; - -An @ALTER@ is used to manipulate with ColumnFamily columns. It allows you to add new column definitions and drop existing ones. No results are returned. - -Remember that in Cassandra the column definition is always optional; the definition is only used for validation (and index creation). Columns that have not yet been defined can still be inserted, but Cassandra won't know how to validate them or provide type information to clients. - -Similarly, DROP only removes the definition, it does not actually destroy data. - h2. INSERT _Synopsis:_ Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g?rev=1130170&r1=1130169&r2=1130170&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g Wed Jun 1 14:51:15 2011 @@ -35,8 +35,6 @@ options { import java.util.ArrayList; import org.apache.cassandra.thrift.ConsistencyLevel; import org.apache.cassandra.thrift.InvalidRequestException; - -import static org.apache.cassandra.cql.AlterTableStatement.OperationType; } @members { @@ -115,7 +113,6 @@ query returns [CQLStatement stmnt] | createIndexStatement { $stmnt = new CQLStatement(StatementType.CREATE_INDEX, $createIndexStatement.expr); } | dropKeyspaceStatement { $stmnt = new CQLStatement(StatementType.DROP_KEYSPACE, $dropKeyspaceStatement.ksp); } | dropColumnFamilyStatement { $stmnt = new CQLStatement(StatementType.DROP_COLUMNFAMILY, $dropColumnFamilyStatement.cfam); } -| alterTableStatement { $stmnt = new CQLStatement(StatementType.ALTER_TABLE, $alterTableStatement.expr); } ; // USE ; @@ -389,27 +386,6 @@ dropKeyspaceStatement returns [String ks : K_DROP K_KEYSPACE name=( IDENT | STRING_LITERAL | INTEGER ) endStmnt { $ksp = $name.text; } ; - -alterTableStatement returns [AlterTableStatement expr] -: -{ -OperationType type = null; -String columnFamily = null, columnName = null, validator = null; -} -K_ALTER K_TABLE name=( IDENT | STRING_LITERAL | INTEGER ) { columnFamily = $name.text; } - ( K_ALTER { type = OperationType.ALTER; } - (col=( IDENT | STRING_LITERAL | INTEGER ) { columnName = $col.text; }) - K_TYPE alterValidator=comparatorType { validator = $alterValidator.text; } - | K_ADD { type = OperationType.ADD; } - (col=( IDENT | STRING_LITERAL | INTEGER ) { columnName = $col.text; }) - addValidator=comparatorType { validator = $addValidato
[jira] [Reopened] (CASSANDRA-1709) CQL keyspace and column family management
[ https://issues.apache.org/jira/browse/CASSANDRA-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis reopened CASSANDRA-1709: --- reverted -- patch applied cleanly but still needs rebase to build > CQL keyspace and column family management > - > > Key: CASSANDRA-1709 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1709 > Project: Cassandra > Issue Type: Sub-task > Components: API >Affects Versions: 0.8 beta 1 >Reporter: Eric Evans >Assignee: Pavel Yaskevich >Priority: Minor > Labels: cql > Fix For: 0.8.1 > > Attachments: CASSANDRA-1709-alter-table-statement.patch, > v1-0001-CASSANDRA-1709-CQL-DROP-implementations.txt, > v1-0002-system-tests-for-CQL-DROPs.txt, v1-0003-updated-doco-for-CQL-DROPs.txt > > Original Estimate: 0h > Remaining Estimate: 0h > > CQL specification and implementation for schema management. > This corresponds to the following RPC methods: > * system_add_column_family() > * system_add_keyspace() > * system_drop_keyspace() > * system_update_keyspace() > * system_update_columnfamily() > *Update: 2011-04-11* > All that remains for the Cassandra 1.0 timeline is {{ALTER}} (scroll down for > the agreed upon specification). {{CREATE}} and {{DROP}} are complete. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2725) Update the JDBC semantics contained in the class AbstractResultSet
[ https://issues.apache.org/jira/browse/CASSANDRA-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042203#comment-13042203 ] Rick Shaw commented on CASSANDRA-2725: -- Sorry... I am trying to get all the dependancies documented and entered. But I seem to have gotten ahead of myself. I will prepare a unified patch that covers the affected classes when I complete CResultSet. I published the patch so folks could see what I was doing. I should have been clearer. I could surely use some guidance on how to publish these patches with the least amount of disruption. > Update the JDBC semantics contained in the class AbstractResultSet > -- > > Key: CASSANDRA-2725 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2725 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-JDBC-AbstractResultSet-v1.txt > > > The {{AbstractResultSet}} cleverly isolates all the methods that are not > planned to be implemented in the next release of of the JDBC Result Set > implemented by the class {{CResultSet}}. This improvement will tighten the > JDBC semantics for this set of methods. > This improvement is related to > [CASSANDRA-2720|https://issues.apache.org/jira/browse/CASSANDRA-2720] but is > not blocked by it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2720) The current implementation of CassandraConnection does not always follow documented semantics for a JDBC Connection interface
[ https://issues.apache.org/jira/browse/CASSANDRA-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042206#comment-13042206 ] Rick Shaw commented on CASSANDRA-2720: -- I will rebase it. > The current implementation of CassandraConnection does not always follow > documented semantics for a JDBC Connection interface > - > > Key: CASSANDRA-2720 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2720 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, drivers, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-a JDBC-Connection-v1.txt > > > While the current implementation of many of the classes in the JDBC driver > implementation are practical to get the driver to work they do not always > obey the documented semantics for the associated interfaces. I am proposing > making a pass over the involved implementation members to start the > "tightening" process that will need to happen to use this driver in other > tools an programs that expect stricter adherence than is currently present. > Broad areas of attention are: > - Use of {{SQLFeatureNotSupportedException}} not > {{UnsupportedOperationException}} for methods that The Cassandra > Implementation does not support. > - Checking in appropriate methods for the prescribed throwing of > {{SQLException}} if the method is called on a closed connection. > - providing method implementations for all methods that are not optional even > it it is to return NULL (as prescribed in the Interface description.) > I will cut additional JIRA tickets for other components in the suite. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2673) AssertionError post truncate
[ https://issues.apache.org/jira/browse/CASSANDRA-2673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042199#comment-13042199 ] Sylvain Lebresne commented on CASSANDRA-2673: - +1 > AssertionError post truncate > > > Key: CASSANDRA-2673 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2673 > Project: Cassandra > Issue Type: Bug > Components: Core >Affects Versions: 0.7.0 > Environment: linux 64-bit ubuntu. deb package (datastax). (Random > partitioner) >Reporter: Marko Mikulicic >Assignee: Jonathan Ellis >Priority: Minor > Fix For: 0.7.7, 0.8.1 > > Attachments: 2673.txt > > > I had 3 nodes with about 100G in a CF. I run truncate on that CF from > cassandra-cli. Then I run cleanup for that CF. I saw this exception shortly > after. > INFO [FlushWriter:5] 2011-05-20 02:56:42,699 Memtable.java (line 157) > Writing Memtable-body@1278535630(26722 bytes, 1 operations) > INFO [FlushWriter:5] 2011-05-20 02:56:42,706 Memtable.java (line 172) > Completed flushing /var/lib/cassandra/data/dnet/body-f-1892-Data.db (26915 > bytes) > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,981 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1892 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,982 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1889 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,983 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1890 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,983 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1888 > INFO [NonPeriodicTasks:1] 2011-05-20 02:59:55,984 SSTable.java (line 147) > Deleted /var/lib/cassandra/data/dnet/body-f-1887 > INFO [CompactionExecutor:1] 2011-05-20 03:02:08,724 CompactionManager.java > (line 750) Cleaned up to > /var/lib/cassandra/data/dnet/body-tmp-f-1891-Data.db. 25,629,365,173 to > 25,629,365,173 (~100% of original) bytes for 884,546 keys. Time: 1,165,900ms. > ERROR [CompactionExecutor:1] 2011-05-20 03:02:08,727 > AbstractCassandraDaemon.java (line 114) Fatal exception in thread > Thread[CompactionExecutor:1,1,main] > java.lang.AssertionError > at > org.apache.cassandra.io.sstable.SSTableTracker.replace(SSTableTracker.java:108) > at > org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:1037) > at > org.apache.cassandra.db.CompactionManager.doCleanupCompaction(CompactionManager.java:769) > at > org.apache.cassandra.db.CompactionManager.access$500(CompactionManager.java:56) > at > org.apache.cassandra.db.CompactionManager$2.call(CompactionManager.java:173) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2725) Update the JDBC semantics contained in the class AbstractResultSet
[ https://issues.apache.org/jira/browse/CASSANDRA-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042197#comment-13042197 ] Jonathan Ellis commented on CASSANDRA-2725: --- bq. Patch submitted to make changes discussed above. this breaks the build -- methods are removed from ARS but not added to CRS. > Update the JDBC semantics contained in the class AbstractResultSet > -- > > Key: CASSANDRA-2725 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2725 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-JDBC-AbstractResultSet-v1.txt > > > The {{AbstractResultSet}} cleverly isolates all the methods that are not > planned to be implemented in the next release of of the JDBC Result Set > implemented by the class {{CResultSet}}. This improvement will tighten the > JDBC semantics for this set of methods. > This improvement is related to > [CASSANDRA-2720|https://issues.apache.org/jira/browse/CASSANDRA-2720] but is > not blocked by it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2729) Update the JDBC semantics contained in the interface CassandraResultSet
Update the JDBC semantics contained in the interface CassandraResultSet --- Key: CASSANDRA-2729 URL: https://issues.apache.org/jira/browse/CASSANDRA-2729 Project: Cassandra Issue Type: Improvement Components: API Affects Versions: 0.8.0 beta 2 Reporter: Rick Shaw Assignee: Rick Shaw Priority: Minor Fix For: 0.8.1 The {{CassandraResultSet}} is an interface that defines the extended set of methods that are implemented in the Cassandra implementation of the JDBC {{ResultSet}}. It can be used with the {{unwrap(Class)}} method to access the extended methods of the Cassandra specific implementation. This improvement adds a "{{throws SQLException}}" clause to each additional method of the interface to better align with the existing semantics of methods in a {{ResultSet}} implementation. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2720) The current implementation of CassandraConnection does not always follow documented semantics for a JDBC Connection interface
[ https://issues.apache.org/jira/browse/CASSANDRA-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042193#comment-13042193 ] Jonathan Ellis commented on CASSANDRA-2720: --- Not sure how to apply this patch. I get {noformat} form:svn-0.8 jonathan$ patch -p0 < Cleanup-semantics+for-a+JDBC-Connection-v1.txt patching file drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java patch: malformed patch at line 76: this method"); {noformat} Looks like the patch was run through something that inserted newlines into "long" lines, which is broken. > The current implementation of CassandraConnection does not always follow > documented semantics for a JDBC Connection interface > - > > Key: CASSANDRA-2720 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2720 > Project: Cassandra > Issue Type: Improvement > Components: API >Affects Versions: 0.8.0 beta 2 >Reporter: Rick Shaw >Assignee: Rick Shaw >Priority: Minor > Labels: cql, drivers, jdbc > Fix For: 0.8.1 > > Attachments: Cleanup-semantics for-a JDBC-Connection-v1.txt > > > While the current implementation of many of the classes in the JDBC driver > implementation are practical to get the driver to work they do not always > obey the documented semantics for the associated interfaces. I am proposing > making a pass over the involved implementation members to start the > "tightening" process that will need to happen to use this driver in other > tools an programs that expect stricter adherence than is currently present. > Broad areas of attention are: > - Use of {{SQLFeatureNotSupportedException}} not > {{UnsupportedOperationException}} for methods that The Cassandra > Implementation does not support. > - Checking in appropriate methods for the prescribed throwing of > {{SQLException}} if the method is called on a closed connection. > - providing method implementations for all methods that are not optional even > it it is to return NULL (as prescribed in the Interface description.) > I will cut additional JIRA tickets for other components in the suite. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2405) should expose 'time since last successful repair' for easier aes monitoring
[ https://issues.apache.org/jira/browse/CASSANDRA-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042190#comment-13042190 ] Jonathan Ellis commented on CASSANDRA-2405: --- bq. what do people think of keeping an history I like that. No reason to throw away such small pieces of potentially useful information. > should expose 'time since last successful repair' for easier aes monitoring > --- > > Key: CASSANDRA-2405 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2405 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Peter Schuller >Assignee: Pavel Yaskevich >Priority: Minor > Fix For: 0.8.1 > > Attachments: CASSANDRA-2405-v2.patch, CASSANDRA-2405.patch > > > The practical implementation issues of actually ensuring repair runs is > somewhat of an undocumented/untreated issue. > One hopefully low hanging fruit would be to at least expose the time since > last successful repair for a particular column family, to make it easier to > write a correct script to monitor for lack of repair in a non-buggy fashion. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-2728) Update the JDBC semantics contained in the class CResultSet
Update the JDBC semantics contained in the class CResultSet --- Key: CASSANDRA-2728 URL: https://issues.apache.org/jira/browse/CASSANDRA-2728 Project: Cassandra Issue Type: Improvement Components: API Affects Versions: 0.8.0 beta 2 Reporter: Rick Shaw Assignee: Rick Shaw Fix For: 0.8.1 {{CResultSet}} is the Cassandra implementation class for the JDBC {{ResultSet}} interface. This key class needs to strictly adhere to the semantics laid down for a JDBC implementation. All required methods that will _not_ be implemented in some way by this class are placed in the {{AbstractResultSet}} class and are extended by this implementation class. Modifications to {{AbstractResultSet}} are covered by [CASSANDRA-2725|https://issues.apache.org/jira/browse/CASSANDRA-2725]. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2405) should expose 'time since last successful repair' for easier aes monitoring
[ https://issues.apache.org/jira/browse/CASSANDRA-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042175#comment-13042175 ] Sylvain Lebresne commented on CASSANDRA-2405: - This needs rebasing. First, two small remarks: * It seems we store the time in microseconds but then, when computing the time since last repair we use System.currentTimeMillis() - stored_time. * I would be in favor of calling the system table REPAIR_INFO, because the truth is I think it would make sense to record a number of other statistics on repair and it doesn't hurt to make the system table less specific. That also means we should probably not force any type for the value (though that can be easily changed later, so it's not a bit deal for this patch). * I think we usually put the code to query the system table in SystemTable, so I would move it from AntiEntropy to there. Then more generally, a given repair involves multiple states and multiple nodes, so I don't think keeping only one timestamp is enough. Right now, we save the time of the last scheduled validation compaction on each node. With only that we're missing information so that people can do any reasonably inform decision: * First, this does not correspond to the last repair session started on that node, since the validation can be a request from another node. People may be interested by that information. * Second, given that repair concerns a given range, keeping only one general number is wrong (it would suggest the node have been repaired recently even when only one range out of 3 or 5 have been actually repaired). * Third, though recording the start of the validation compaction is important, this says nothing on the success of the repair (and we all know failing during repair do happen, if only because it's a fairly long operation during which node can die). So we need to record some info on the success of the operation if we don't want to return misleading information. Turns out, this is easy to record on the node coordinating the repair, maybe not so much on the other node participating in the repair. Truth is, I'm not so sure what is the simplest way to handle this. Maybe one option could be to only register the start and end time of a repair session on the coordinator of the repair (adding the info of which range was repaired). Also, what do people think of keeping an history (instead of just keeping the last number). I'm thinking a little bit ahead here, but what about storing one supercolumn by repair, where the super column name would be the repair session id (a TimeUUID really) and the columns infos on that repair. For this patch we would only record the range for that session, the start time and the end time (or maybe one end time for each node). But we would populate this a little bit further with stuff like CASSANDRA-2698. I think having such history would be fairly interesting. > should expose 'time since last successful repair' for easier aes monitoring > --- > > Key: CASSANDRA-2405 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2405 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Peter Schuller >Assignee: Pavel Yaskevich >Priority: Minor > Fix For: 0.8.1 > > Attachments: CASSANDRA-2405-v2.patch, CASSANDRA-2405.patch > > > The practical implementation issues of actually ensuring repair runs is > somewhat of an undocumented/untreated issue. > One hopefully low hanging fruit would be to at least expose the time since > last successful repair for a particular column family, to make it easier to > write a correct script to monitor for lack of repair in a non-buggy fashion. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1130132 - in /cassandra/branches/cassandra-0.8: ./ doc/cql/ src/java/org/apache/cassandra/cql/ test/system/
Author: jbellis Date: Wed Jun 1 12:58:40 2011 New Revision: 1130132 URL: http://svn.apache.org/viewvc?rev=1130132&view=rev Log: add CQL ALTER TABLE patch by pyaskevich; reviewed by jbellis for CASSANDRA-1709 Modified: cassandra/branches/cassandra-0.8/CHANGES.txt cassandra/branches/cassandra-0.8/doc/cql/CQL.textile cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/QueryProcessor.java cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/StatementType.java cassandra/branches/cassandra-0.8/test/system/test_cql.py Modified: cassandra/branches/cassandra-0.8/CHANGES.txt URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1130132&r1=1130131&r2=1130132&view=diff == --- cassandra/branches/cassandra-0.8/CHANGES.txt (original) +++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jun 1 12:58:40 2011 @@ -30,6 +30,8 @@ * Added support for making bootstrap retry if nodes flap (CASSANDRA-2644) * Added statusthrift to nodetool to report if thrift server is running (CASSANDRA-2722) * Fixed rows being cached if they do not exist (CASSANDRA-2723) + * Add CQL ALTER TABLE (CASSANDRA-1709) + 0.8.0-final * fix CQL grammar warning and cqlsh regression from CASSANDRA-2622 Modified: cassandra/branches/cassandra-0.8/doc/cql/CQL.textile URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/doc/cql/CQL.textile?rev=1130132&r1=1130131&r2=1130132&view=diff == --- cassandra/branches/cassandra-0.8/doc/cql/CQL.textile (original) +++ cassandra/branches/cassandra-0.8/doc/cql/CQL.textile Wed Jun 1 12:58:40 2011 @@ -69,6 +69,21 @@ SELECT ... WHERE [LIMIT N] ... Limiting the number of rows returned can be achieved by adding the @LIMIT@ option to a @SELECT@ expression. @LIMIT@ defaults to 10,000 when left unset. +h2. ALTER TABLE + +_Synopsis:_ + +bc. +ALTER TABLE ADD ; +ALTER TABLE ALTER TYPE ; +ALTER TABLE DROP ; + +An @ALTER@ is used to manipulate with ColumnFamily columns. It allows you to add new column definitions and drop existing ones. No results are returned. + +Remember that in Cassandra the column definition is always optional; the definition is only used for validation (and index creation). Columns that have not yet been defined can still be inserted, but Cassandra won't know how to validate them or provide type information to clients. + +Similarly, DROP only removes the definition, it does not actually destroy data. + h2. INSERT _Synopsis:_ Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g?rev=1130132&r1=1130131&r2=1130132&view=diff == --- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g (original) +++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/Cql.g Wed Jun 1 12:58:40 2011 @@ -35,6 +35,8 @@ options { import java.util.ArrayList; import org.apache.cassandra.thrift.ConsistencyLevel; import org.apache.cassandra.thrift.InvalidRequestException; + +import static org.apache.cassandra.cql.AlterTableStatement.OperationType; } @members { @@ -113,6 +115,7 @@ query returns [CQLStatement stmnt] | createIndexStatement { $stmnt = new CQLStatement(StatementType.CREATE_INDEX, $createIndexStatement.expr); } | dropKeyspaceStatement { $stmnt = new CQLStatement(StatementType.DROP_KEYSPACE, $dropKeyspaceStatement.ksp); } | dropColumnFamilyStatement { $stmnt = new CQLStatement(StatementType.DROP_COLUMNFAMILY, $dropColumnFamilyStatement.cfam); } +| alterTableStatement { $stmnt = new CQLStatement(StatementType.ALTER_TABLE, $alterTableStatement.expr); } ; // USE ; @@ -386,6 +389,27 @@ dropKeyspaceStatement returns [String ks : K_DROP K_KEYSPACE name=( IDENT | STRING_LITERAL | INTEGER ) endStmnt { $ksp = $name.text; } ; + +alterTableStatement returns [AlterTableStatement expr] +: +{ +OperationType type = null; +String columnFamily = null, columnName = null, validator = null; +} +K_ALTER K_TABLE name=( IDENT | STRING_LITERAL | INTEGER ) { columnFamily = $name.text; } + ( K_ALTER { type = OperationType.ALTER; } + (col=( IDENT | STRING_LITERAL | INTEGER ) { columnName = $col.text; }) + K_TYPE alterValidator=comparatorType { validator = $alterValidator.text; } + | K_ADD { type = OperationType.ADD; } + (col=( IDENT | STRING_LITERAL | INTEGER ) { columnName = $col.text; }) +