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

Tyler Hobbs commented on CASSANDRA-8102:
----------------------------------------

Sure, I can review.

When creating a new column family with a min/max_compaction_threshold through 
cassandra-cli, you'll get a NullPointerException with the following stacktrace 
(when {{--debug}} is used):

{noformat}
[default@ks1] create column family bar WITH min_compaction_threshold = 8;
java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
        at 
org.apache.cassandra.cli.CliClient.executeAddColumnFamily(CliClient.java:1124)
        at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:244)
        at 
org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:201)
        at org.apache.cassandra.cli.CliMain.main(CliMain.java:331)
Caused by: java.lang.NullPointerException
        at 
org.apache.cassandra.cli.CliClient.updateCfDefAttributes(CliClient.java:1322)
        at 
org.apache.cassandra.cli.CliClient.executeAddColumnFamily(CliClient.java:1114)
        ... 3 more
{noformat}

It looks like the compaction strategy options need to be initialized before we 
try to put an option in them.

> cassandra-cli and cqlsh report two different values for a setting, partially 
> update it and partially report it
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8102
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8102
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: 2.0.9
>            Reporter: Peter Haggerty
>            Assignee: Stefania
>            Priority: Minor
>              Labels: cli, cqlsh
>             Fix For: 2.0.15
>
>
> cassandra-cli updates and prints out a min_compaction_threshold that is not 
> shown by cqlsh (it shows a different min_threshold attribute)
> cqlsh updates "both" values but only shows one of them
> {code}
> cassandra-cli:
> UPDATE COLUMN FAMILY foo WITH min_compaction_threshold = 8;
> $ echo "describe foo;" | cassandra-cli -h `hostname` -k bar
>       Compaction min/max thresholds: 8/32
> $ echo "describe table foo;" | cqlsh -k bar `hostname`
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
> {code}
> {code}
> cqlsh:
> ALTER TABLE foo WITH compaction = {'class' : 'SizeTieredCompactionStrategy', 
> 'min_threshold' : 16};
> cassandra-cli:
>       Compaction min/max thresholds: 16/32
>       Compaction Strategy Options:
>         min_threshold: 16
> cqlsh:
>   compaction={'min_threshold': '16', 'class': 'SizeTieredCompactionStrategy'} 
> AND
> {code}
> {code}
> cassandra-cli:
> UPDATE COLUMN FAMILY foo WITH min_compaction_threshold = 8;
> cassandra-cli:
>       Compaction min/max thresholds: 8/32
>       Compaction Strategy Options:
>         min_threshold: 16
> cqlsh:
>   compaction={'min_threshold': '16', 'class': 'SizeTieredCompactionStrategy'} 
> AND
> {code}



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

Reply via email to