You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Thierry Boileau (JIRA)" <ji...@apache.org> on 2012/11/30 18:47:58 UTC

[jira] [Comment Edited] (CASSANDRA-5008) "show schema" command in cassandra-cli generates wrong "index_options" values.

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

Thierry Boileau edited comment on CASSANDRA-5008 at 11/30/12 5:46 PM:
----------------------------------------------------------------------

After some investigations, it appears that the "index_options" attributes are badly generated when there is actually no index options :

create column family Test
  with column_type = 'Standard'
  and comparator = 'UTF8Type'
  and default_validation_class = 'UTF8Type'
  and key_validation_class = 'UTF8Type'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and column_metadata = [
    {column_name : 'email',
    validation_class : UTF8Type,
    index_name : 'test_email',
    index_type : 0,
    index_options : {

}},
    {column_name : 'enabled',
    validation_class : UTF8Type,
    index_name : 'test_enabled',
    index_type : 0,
    index_options : {

}},
    {column_name : 'roles',
    validation_class : UTF8Type,
    index_name : 'test_roles',
    index_type : 0,
    index_options : {

}}]
                
      was (Author: thboileau):
    After some investigations, it appears that the "index_options" attributes are badly generated when there is actually no index options :

create column family Test
  with column_type = 'Standard'
  and comparator = 'UTF8Type'
  and default_validation_class = 'UTF8Type'
  and key_validation_class = 'UTF8Type'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and column_metadata = [
    {column_name : 'email',
    validation_class : UTF8Type,
    index_name : 'test_email',
    index_type : 0,
    index_options : {
}},
    {column_name : 'enabled',
    validation_class : UTF8Type,
    index_name : 'test_enabled',
    index_type : 0,
    index_options : {
}},
    {column_name : 'roles',
    validation_class : UTF8Type,
    index_name : 'test_roles',
    index_type : 0,
    index_options : {
}}]
                  
> "show schema" command in cassandra-cli generates wrong "index_options" values.
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-5008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5008
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.6
>         Environment: ubuntu 12.04
>            Reporter: Thierry Boileau
>
> Using cassandra-cli, launch the "show schema" command and save the output to a file.
> Try to import it in order to recreate the schema, it fails with error message :
> "Syntax error at position 626: no viable alternative at input '}'"

--
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