You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "sunjian (JIRA)" <ji...@apache.org> on 2012/10/15 12:36:02 UTC
[jira] [Updated] (CASSANDRA-4805) live update compaction strategy
destroy counter column family
[ https://issues.apache.org/jira/browse/CASSANDRA-4805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sunjian updated CASSANDRA-4805:
-------------------------------
Description:
1. in a running cassandra cluster with 5 nodes
2. CLI : update column family {user_stats (a counter column family)} with compaction_strategy='LeveledCompaction'
3. nodetool -h host_ip compact
result :
can't INCR/DECR the counter column any more , but it's OK to read .
----------------
counter column family definition :
String sql = "CREATE TABLE user_stats (" +
"user_id bigint ," +
"counter_type text ," +
"counter_for_what text ," +
"counter_value counter ," +
" PRIMARY KEY("
+ " user_id "
+ ","
+ "counter_type "
+ ","
+ "counter_for_what "
+")) WITH read_repair_chance = 1.0 AND replicate_on_write=true " ;
[exception]
java.sql.SQLSyntaxErrorException: InvalidRequestException(why:Unknown identifier counter_value)
at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:92)
at org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:303)
was:
1. in a running cassandra cluster with 5 nodes
2. CLI : update column family {user_stats (a counter column family)} with compaction_strategy='LeveledCompaction'
3. nodetool -h host_ip compact
result :
can't INCR/DECR the counter column any more , but it's OK to read .
----------------
counter column family definition :
String sql = "CREATE TABLE " + this.columnFamilyEnum.getColumnFamilyName() + " (" +
COL_UID + " bigint ," +
COL_COUNTER_TYPE + " text ," +
COL_COUNTER_FOR_WHAT + " text ," +
COL_COUNTER_VALUE + " counter ," +
" PRIMARY KEY("
+ COL_UID
+ ","
+ COL_COUNTER_TYPE
+ ","
+ COL_COUNTER_FOR_WHAT
+")) WITH read_repair_chance = 1.0 AND replicate_on_write=true " ;
[exception]
java.sql.SQLSyntaxErrorException: InvalidRequestException(why:Unknown identifier counter_value)
at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:92)
at org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:303)
> live update compaction strategy destroy counter column family
> --------------------------------------------------------------
>
> Key: CASSANDRA-4805
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4805
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.5
> Environment: centos 64 , cassandra 1.1.5
> Reporter: sunjian
>
> 1. in a running cassandra cluster with 5 nodes
> 2. CLI : update column family {user_stats (a counter column family)} with compaction_strategy='LeveledCompaction'
> 3. nodetool -h host_ip compact
> result :
> can't INCR/DECR the counter column any more , but it's OK to read .
> ----------------
> counter column family definition :
> String sql = "CREATE TABLE user_stats (" +
> "user_id bigint ," +
> "counter_type text ," +
> "counter_for_what text ," +
> "counter_value counter ," +
> " PRIMARY KEY("
> + " user_id "
> + ","
> + "counter_type "
> + ","
> + "counter_for_what "
> +")) WITH read_repair_chance = 1.0 AND replicate_on_write=true " ;
> [exception]
> java.sql.SQLSyntaxErrorException: InvalidRequestException(why:Unknown identifier counter_value)
> at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:92)
> at org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:303)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira