[jira] [Commented] (CASSANDRA-4421) Invalid validator used for column values of composite columns -> writing fails

2012-07-06 Thread bert Passek (JIRA)

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

bert Passek commented on CASSANDRA-4421:


Ah, well the issue was already closed so i didn't care the attachement. But you 
are right, i had problems inserting data from thrift (via client.batch_mutate) 
to a cql3 cf. I just mentioned in the debugger, that ThriftValidation doesn't 
know about metadata, so default validator is always used which results in 
rejecting data on server side.

Sometimes it can be confusing when talking about cql 2, 3, cli,thrift etc. :)

Thanks.

> Invalid validator used for column values of composite columns -> writing fails
> --
>
> Key: CASSANDRA-4421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Affects Versions: 1.1.0
> Environment: Debian Squeeze
>Reporter: bert Passek
>Assignee: Sylvain Lebresne
>  Labels: cql3
> Fix For: 1.1.3
>
>
> Hello,
> i faced a bug while writing composite column values and following validation 
> on server side.
> This is the setup for reproduction:
> 1. create a keyspace
> create keyspace test with strategy_class = 'SimpleStrategy' and 
> strategy_options:replication_factor = 1;
> 2. create a cf via cql (3.0)
> create table test1 (
> a int,
> b int,
> c int,
> primary key (a, b)
> );
> If i have a look at the schema in cli i noticed that there is no column 
> metadata for columns not part of primary key.
> create column family test1
>   with column_type = 'Standard'
>   and comparator = 
> 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'Int32Type'
>   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 compression_options = {'sstable_compression' : 
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> Please notice the default validation class: UTF8Type
> Now i would like to insert value > 127 via cassandra client (no cql, part of 
> mr-jobs). Have a look at the attachement.
> Batch mutate fails:
> InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
> failed validation)
> A validator for column value is fetched in 
> ThriftValidation::validateColumnData which returns always the default 
> validator which is UTF8Type as described above (The ColumnDefinition for 
> given column name "c" is always null)
> In UTF8Type there is a check for
> if (b > 127)
>return false;
> Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
> creation. I assigned data types to all columns, but i can not set values for 
> a composite column because the default validation class is used.
> I think the schema should know the correct validator even for composite 
> columns. The usage of the default validation class does not make sense.
> Best Regards 
> Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4421) Invalid validator used for column values of composite columns -> writing fails

2012-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4421:
---

You can still create appropriate composites from m/r, but the schema design 
doesn't fit in the structures thrift knows about.  So just create a (int, 'c') 
composite value and an int column name and you'll be fine.  The cli can't 
display this metadata because it only knows how to deal with named 
non-composite columns.

> Invalid validator used for column values of composite columns -> writing fails
> --
>
> Key: CASSANDRA-4421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Affects Versions: 1.1.2
> Environment: Debian Squeeze
>Reporter: bert Passek
>
> Hello,
> i faced a bug while writing composite column values and following validation 
> on server side.
> This is the setup for reproduction:
> 1. create a keyspace
> create keyspace test with strategy_class = 'SimpleStrategy' and 
> strategy_options:replication_factor = 1;
> 2. create a cf via cql (3.0)
> create table test1 (
> a int,
> b int,
> c int,
> primary key (a, b)
> );
> If i have a look at the schema in cli i noticed that there is no column 
> metadata for columns not part of primary key.
> create column family test1
>   with column_type = 'Standard'
>   and comparator = 
> 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'Int32Type'
>   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 compression_options = {'sstable_compression' : 
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> Please notice the default validation class: UTF8Type
> Now i would like to insert value > 127 via cassandra client (no cql, part of 
> mr-jobs). Have a look at the attachement.
> Batch mutate fails:
> InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
> failed validation)
> A validator for column value is fetched in 
> ThriftValidation::validateColumnData which returns always the default 
> validator which is UTF8Type as described above (The ColumnDefinition for 
> given column name "c" is always null)
> In UTF8Type there is a check for
> if (b > 127)
>return false;
> Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
> creation. I assigned data types to all columns, but i can not set values for 
> a composite column because the default validation class is used.
> I think the schema should know the correct validator even for composite 
> columns. The usage of the default validation class does not make sense.
> Best Regards 
> Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4421) Invalid validator used for column values of composite columns -> writing fails

2012-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4421:
---

I should say: you need to use cqlsh, or cql from the client (see comments on 
CASSANDRA-4377).

> Invalid validator used for column values of composite columns -> writing fails
> --
>
> Key: CASSANDRA-4421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Affects Versions: 1.1.2
> Environment: Debian Squeeze
>Reporter: bert Passek
>
> Hello,
> i faced a bug while writing composite column values and following validation 
> on server side.
> This is the setup for reproduction:
> 1. create a keyspace
> create keyspace test with strategy_class = 'SimpleStrategy' and 
> strategy_options:replication_factor = 1;
> 2. create a cf via cql (3.0)
> create table test1 (
> a int,
> b int,
> c int,
> primary key (a, b)
> );
> If i have a look at the schema in cli i noticed that there is no column 
> metadata for columns not part of primary key.
> create column family test1
>   with column_type = 'Standard'
>   and comparator = 
> 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'Int32Type'
>   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 compression_options = {'sstable_compression' : 
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> Please notice the default validation class: UTF8Type
> Now i would like to insert value > 127 via cassandra client (no cql, part of 
> mr-jobs). Have a look at the attachement.
> Batch mutate fails:
> InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
> failed validation)
> A validator for column value is fetched in 
> ThriftValidation::validateColumnData which returns always the default 
> validator which is UTF8Type as described above (The ColumnDefinition for 
> given column name "c" is always null)
> In UTF8Type there is a check for
> if (b > 127)
>return false;
> Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
> creation. I assigned data types to all columns, but i can not set values for 
> a composite column because the default validation class is used.
> I think the schema should know the correct validator even for composite 
> columns. The usage of the default validation class does not make sense.
> Best Regards 
> Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4421) Invalid validator used for column values of composite columns -> writing fails

2012-07-06 Thread bert Passek (JIRA)

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

bert Passek commented on CASSANDRA-4421:


Oh, i got it, so it means we can not use MR-Jobs using ColumnFamilyOutputFormat 
or BulkOutputFormat?

> Invalid validator used for column values of composite columns -> writing fails
> --
>
> Key: CASSANDRA-4421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Affects Versions: 1.1.2
> Environment: Debian Squeeze
>Reporter: bert Passek
>
> Hello,
> i faced a bug while writing composite column values and following validation 
> on server side.
> This is the setup for reproduction:
> 1. create a keyspace
> create keyspace test with strategy_class = 'SimpleStrategy' and 
> strategy_options:replication_factor = 1;
> 2. create a cf via cql (3.0)
> create table test1 (
> a int,
> b int,
> c int,
> primary key (a, b)
> );
> If i have a look at the schema in cli i noticed that there is no column 
> metadata for columns not part of primary key.
> create column family test1
>   with column_type = 'Standard'
>   and comparator = 
> 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'Int32Type'
>   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 compression_options = {'sstable_compression' : 
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> Please notice the default validation class: UTF8Type
> Now i would like to insert value > 127 via cassandra client (no cql, part of 
> mr-jobs). Have a look at the attachement.
> Batch mutate fails:
> InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
> failed validation)
> A validator for column value is fetched in 
> ThriftValidation::validateColumnData which returns always the default 
> validator which is UTF8Type as described above (The ColumnDefinition for 
> given column name "c" is always null)
> In UTF8Type there is a check for
> if (b > 127)
>return false;
> Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
> creation. I assigned data types to all columns, but i can not set values for 
> a composite column because the default validation class is used.
> I think the schema should know the correct validator even for composite 
> columns. The usage of the default validation class does not make sense.
> Best Regards 
> Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4421) Invalid validator used for column values of composite columns -> writing fails

2012-07-06 Thread bert Passek (JIRA)

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

bert Passek commented on CASSANDRA-4421:


Yes, as i can remember i started cqlsh via "cqlsh -3" which is supposed to use 
cql 3.0, isn't it. But let me check again.

> Invalid validator used for column values of composite columns -> writing fails
> --
>
> Key: CASSANDRA-4421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Affects Versions: 1.1.2
> Environment: Debian Squeeze
>Reporter: bert Passek
>
> Hello,
> i faced a bug while writing composite column values and following validation 
> on server side.
> This is the setup for reproduction:
> 1. create a keyspace
> create keyspace test with strategy_class = 'SimpleStrategy' and 
> strategy_options:replication_factor = 1;
> 2. create a cf via cql (3.0)
> create table test1 (
> a int,
> b int,
> c int,
> primary key (a, b)
> );
> If i have a look at the schema in cli i noticed that there is no column 
> metadata for columns not part of primary key.
> create column family test1
>   with column_type = 'Standard'
>   and comparator = 
> 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'Int32Type'
>   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 compression_options = {'sstable_compression' : 
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> Please notice the default validation class: UTF8Type
> Now i would like to insert value > 127 via cassandra client (no cql, part of 
> mr-jobs). Have a look at the attachement.
> Batch mutate fails:
> InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
> failed validation)
> A validator for column value is fetched in 
> ThriftValidation::validateColumnData which returns always the default 
> validator which is UTF8Type as described above (The ColumnDefinition for 
> given column name "c" is always null)
> In UTF8Type there is a check for
> if (b > 127)
>return false;
> Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
> creation. I assigned data types to all columns, but i can not set values for 
> a composite column because the default validation class is used.
> I think the schema should know the correct validator even for composite 
> columns. The usage of the default validation class does not make sense.
> Best Regards 
> Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira