Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28541102F6 for ; Mon, 3 Jun 2013 20:20:22 +0000 (UTC) Received: (qmail 34848 invoked by uid 500); 3 Jun 2013 20:20:22 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 34832 invoked by uid 500); 3 Jun 2013 20:20:22 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 34823 invoked by uid 99); 3 Jun 2013 20:20:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 20:20:22 +0000 Date: Mon, 3 Jun 2013 20:20:21 +0000 (UTC) From: "Colin B. (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-4421) Support cql3 table definitions in Hadoop InputFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colin B. updated CASSANDRA-4421: -------------------------------- Attachment: 4421-8-cb.txt > Support cql3 table definitions in Hadoop InputFormat > ---------------------------------------------------- > > Key: CASSANDRA-4421 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4421 > Project: Cassandra > Issue Type: Improvement > Components: API > Affects Versions: 1.1.0 > Environment: Debian Squeeze > Reporter: bert Passek > Labels: cql3 > Fix For: 1.2.6 > > Attachments: 4421-1.txt, 4421-2.txt, 4421-3.txt, 4421-4.txt, 4421-5.txt, 4421-6.cb.txt, 4421-6-je.txt, 4421-7-je.txt, 4421-8-cb.txt, 4421.txt > > > 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 For more information on JIRA, see: http://www.atlassian.com/software/jira