cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sotirios Delimanolis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8585) Thrift CLI client reporting inconsistent column family structure after upgrade to Cassandra 2.1.2
Date Thu, 08 Jan 2015 20:39:34 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sotirios Delimanolis updated CASSANDRA-8585:
--------------------------------------------
    Description: 
After upgrading from Cassandra 2.0.6.4 to Cassandra 2.1.2-SNAPSHOT, the Thrift CLI client
started reporting wrong default_validation_class for a Column Family.

For example, 

{noformat}
[default@MyKeyspace] show schema;
[...]
create column family SomeColumnFamily
  with column_type = 'Standard'
  and comparator = 'BytesType'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'BytesType'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 10800
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and cells_per_row_to_cache = '0'
  and default_time_to_live = 0
  and speculative_retry = 'NONE'
  and compaction_strategy_options = {'tombstone_compaction_interval' : '300', 'sstable_size_in_mb'
: '200', 'tombstone_threshold' : '0.1'}
  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
{noformat}

but

{noformat}
[default@MyKeyspace] describe SomeColumnFamily;

WARNING: CQL3 tables are intentionally omitted from 'describe' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

    ColumnFamily: SomeColumnFamily
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 10800
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Caching: KEYS_ONLY
      Default time to live: 0
      Bloom Filter FP chance: default
      Index interval: default
      Speculative Retry: NONE
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
      Compaction Strategy Options:
        tombstone_compaction_interval: 300
        sstable_size_in_mb: 200
        tombstone_threshold: 0.1
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
{noformat}

Note how the default column value validator and cell sorting is UTF8Type rather than the BytesType
reported earlier.

If I populate the column family and list its rows, I get

{noformat}
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
String didn't validate.
{noformat}

I can't see the row. I can temporarily fix this by setting the default_column_validator

{noformat}
[default@MyKeyspace] update column family SomeColumnFamily with default_validation_class =
BytesType;
0fba13e4-aac6-3963-ad65-ba354d99ebdc
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
=> (name=some name, value=some value, timestamp=635540144263687300)
-------------------
[More RowKeys]
{noformat}

If I do a DESCRIBE again, though, LIST stops working again.

{noformat}
[default@KeySpace] describe SomeColumnFamily;

WARNING: CQL3 tables are intentionally omitted from 'describe' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

    ColumnFamily: SomeColumnFamily
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 10800
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Caching: KEYS_ONLY
      Default time to live: 0
      Bloom Filter FP chance: default
      Index interval: default
      Speculative Retry: NONE
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
      Compaction Strategy Options:
        tombstone_compaction_interval: 300
        sstable_size_in_mb: 200
        tombstone_threshold: 0.1
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
String didn't validate.
{noformat}

I can access the column family rows with other clients, the C# driver for example.

With C#

{code:}
var keyspaceDef = pool.DescribeKeyspace ("MyKeyspace");
var cfDefs = keyspaceDef.Cf_defs;
foreach (CfDef cfDef in cfDefs) {
    if (cfDef.Name == "SomeColumnFamily") {
        Console.WriteLine ("Default validation class: " + cfDef.Default_validation_class);
        Console.WriteLine ("Comparator type: " + cfDef.Comparator_type);
        Console.WriteLine ("Key validation class: " + cfDef.Key_validation_class);
    }
}
{code}

outputs

{noformat}
Default validation class: org.apache.cassandra.db.marshal.BytesType
Comparator type: org.apache.cassandra.db.marshal.BytesType
Key validation class: org.apache.cassandra.db.marshal.BytesType
{noformat}

  was:
After upgrading from Cassandra 2.0.6.4 to Cassandra 2.1.2-SNAPSHOT, the Thrift CLI client
started reporting wrong default_validation_class for a Column Family.

For example, 

{noformat}
[default@MyKeyspace] show schema;
[...]
create column family SomeColumnFamily
  with column_type = 'Standard'
  and comparator = 'BytesType'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'BytesType'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 10800
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and cells_per_row_to_cache = '0'
  and default_time_to_live = 0
  and speculative_retry = 'NONE'
  and compaction_strategy_options = {'tombstone_compaction_interval' : '300', 'sstable_size_in_mb'
: '200', 'tombstone_threshold' : '0.1'}
  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
{noformat}

but

{noformat}
[default@MyKeyspace] describe SomeColumnFamily;

WARNING: CQL3 tables are intentionally omitted from 'describe' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

    ColumnFamily: SomeColumnFamily
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 10800
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Caching: KEYS_ONLY
      Default time to live: 0
      Bloom Filter FP chance: default
      Index interval: default
      Speculative Retry: NONE
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
      Compaction Strategy Options:
        tombstone_compaction_interval: 300
        sstable_size_in_mb: 200
        tombstone_threshold: 0.1
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
{noformat}

Note how the default column value validator and cell sorting is UTF8Type rather than the BytesType
reported earlier.

If I populate the column family and list its rows, I get

{noformat}
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
String didn't validate.
{noformat}

I can't see the row. I can temporarily fix this by setting the default_column_validator

{noformat}
[default@MyKeyspace] update column family SomeColumnFamily with default_validation_class =
BytesType;
0fba13e4-aac6-3963-ad65-ba354d99ebdc
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
=> (name=some name, value=some value, timestamp=635540144263687300)
-------------------
[More RowKeys]
{noformat}

If I do a DESCRIBE again, though, LIST stops working again.

{noformat}
[default@KeySpace] describe SomeColumnFamily;

WARNING: CQL3 tables are intentionally omitted from 'describe' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

    ColumnFamily: SomeColumnFamily
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 10800
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Caching: KEYS_ONLY
      Default time to live: 0
      Bloom Filter FP chance: default
      Index interval: default
      Speculative Retry: NONE
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
      Compaction Strategy Options:
        tombstone_compaction_interval: 300
        sstable_size_in_mb: 200
        tombstone_threshold: 0.1
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
[default@MyKeyspace] list SomeColumnFamily;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: SomeRowKey
String didn't validate.
{noformat}

I can access the column family rows with other clients, the C# driver for example.

With C#

{code:c#}
            var keyspaceDef = pool.DescribeKeyspace ("MyKeyspace");
            var cfDefs = keyspaceDef.Cf_defs;
            foreach (CfDef cfDef in cfDefs) {
                if (cfDef.Name == "SomeColumnFamily") {
                    Console.WriteLine ("Default validation class: " + cfDef.Default_validation_class);
                    Console.WriteLine ("Comparator type: " + cfDef.Comparator_type);
                    Console.WriteLine ("Key validation class: " + cfDef.Key_validation_class);
                }
            }
{code}

outputs

{noformat}
Default validation class: org.apache.cassandra.db.marshal.BytesType
Comparator type: org.apache.cassandra.db.marshal.BytesType
Key validation class: org.apache.cassandra.db.marshal.BytesType
{noformat}


> Thrift CLI client reporting inconsistent column family structure after upgrade to Cassandra
2.1.2
> -------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8585
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8585
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>            Reporter: Sotirios Delimanolis
>            Assignee: Philip Thompson
>            Priority: Minor
>             Fix For: 2.1.3
>
>         Attachments: schema_columnfamilies.out, schema_columns.out
>
>
> After upgrading from Cassandra 2.0.6.4 to Cassandra 2.1.2-SNAPSHOT, the Thrift CLI client
started reporting wrong default_validation_class for a Column Family.
> For example, 
> {noformat}
> [default@MyKeyspace] show schema;
> [...]
> create column family SomeColumnFamily
>   with column_type = 'Standard'
>   and comparator = 'BytesType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.1
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 10800
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'KEYS_ONLY'
>   and cells_per_row_to_cache = '0'
>   and default_time_to_live = 0
>   and speculative_retry = 'NONE'
>   and compaction_strategy_options = {'tombstone_compaction_interval' : '300', 'sstable_size_in_mb'
: '200', 'tombstone_threshold' : '0.1'}
>   and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
> {noformat}
> but
> {noformat}
> [default@MyKeyspace] describe SomeColumnFamily;
> WARNING: CQL3 tables are intentionally omitted from 'describe' output.
> See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
>     ColumnFamily: SomeColumnFamily
>       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
>       Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
>       Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       GC grace seconds: 10800
>       Compaction min/max thresholds: 4/32
>       Read repair chance: 0.1
>       DC Local Read repair chance: 0.0
>       Caching: KEYS_ONLY
>       Default time to live: 0
>       Bloom Filter FP chance: default
>       Index interval: default
>       Speculative Retry: NONE
>       Built indexes: []
>       Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
>       Compaction Strategy Options:
>         tombstone_compaction_interval: 300
>         sstable_size_in_mb: 200
>         tombstone_threshold: 0.1
>       Compression Options:
>         sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> {noformat}
> Note how the default column value validator and cell sorting is UTF8Type rather than
the BytesType reported earlier.
> If I populate the column family and list its rows, I get
> {noformat}
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> String didn't validate.
> {noformat}
> I can't see the row. I can temporarily fix this by setting the default_column_validator
> {noformat}
> [default@MyKeyspace] update column family SomeColumnFamily with default_validation_class
= BytesType;
> 0fba13e4-aac6-3963-ad65-ba354d99ebdc
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> => (name=some name, value=some value, timestamp=635540144263687300)
> -------------------
> [More RowKeys]
> {noformat}
> If I do a DESCRIBE again, though, LIST stops working again.
> {noformat}
> [default@KeySpace] describe SomeColumnFamily;
> WARNING: CQL3 tables are intentionally omitted from 'describe' output.
> See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
>     ColumnFamily: SomeColumnFamily
>       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
>       Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
>       Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       GC grace seconds: 10800
>       Compaction min/max thresholds: 4/32
>       Read repair chance: 0.1
>       DC Local Read repair chance: 0.0
>       Caching: KEYS_ONLY
>       Default time to live: 0
>       Bloom Filter FP chance: default
>       Index interval: default
>       Speculative Retry: NONE
>       Built indexes: []
>       Compaction Strategy: org.apache.cassandra.db.compaction.LeveledCompactionStrategy
>       Compaction Strategy Options:
>         tombstone_compaction_interval: 300
>         sstable_size_in_mb: 200
>         tombstone_threshold: 0.1
>       Compression Options:
>         sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> String didn't validate.
> {noformat}
> I can access the column family rows with other clients, the C# driver for example.
> With C#
> {code:}
> var keyspaceDef = pool.DescribeKeyspace ("MyKeyspace");
> var cfDefs = keyspaceDef.Cf_defs;
> foreach (CfDef cfDef in cfDefs) {
>     if (cfDef.Name == "SomeColumnFamily") {
>         Console.WriteLine ("Default validation class: " + cfDef.Default_validation_class);
>         Console.WriteLine ("Comparator type: " + cfDef.Comparator_type);
>         Console.WriteLine ("Key validation class: " + cfDef.Key_validation_class);
>     }
> }
> {code}
> outputs
> {noformat}
> Default validation class: org.apache.cassandra.db.marshal.BytesType
> Comparator type: org.apache.cassandra.db.marshal.BytesType
> Key validation class: org.apache.cassandra.db.marshal.BytesType
> {noformat}



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

Mime
View raw message