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 95DE8E6A2 for ; Fri, 11 Jan 2013 03:28:15 +0000 (UTC) Received: (qmail 85418 invoked by uid 500); 11 Jan 2013 03:28:15 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 85267 invoked by uid 500); 11 Jan 2013 03:28:15 -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 84889 invoked by uid 99); 11 Jan 2013 03:28:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 03:28:14 +0000 Date: Fri, 11 Jan 2013 03:28:13 +0000 (UTC) From: "Brian ONeill (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata. 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-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13550784#comment-13550784 ] Brian ONeill commented on CASSANDRA-5138: ----------------------------------------- Just to be clear, I'd be happy with just a more informative message. (translate the ArrayOutOfBounds, to "You may not have enough components in your column name.") To elaborate on the craziness that is accessing tables from CQL that are populated by thrift... We want to enable our "data heads" with cqlsh. They are very excited about it because it looks like SQL, and to date Cassandra has been inaccessible to them. (These are data gurus that are wizards at a SQL prompt, but do not have server-side access to Cassandra) We have existing (and new) applications that use thrift to write (via Astyanax composite/compound columns using annotated classes). We don't want to change our application development paradigm (yet), but we want cqlsh access to the data. In that paradigm, we have encountered this error during development, especially if/when you get the translation wrong between a CQL schema and the thrift interpretation. (which isn't hard to do) > Provide a better CQL error when table data does not conform to CQL metadata. > ---------------------------------------------------------------------------- > > Key: CASSANDRA-5138 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.2.0 > Environment: Mac OS X running 1.2 > Reporter: Brian ONeill > Priority: Minor > Attachments: northpole.cql > > > When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: > TSocket read 0 bytes > Server-side the following exception is logged: > ERROR 15:19:18,016 Error occurred during processing of message. > java.lang.ArrayIndexOutOfBoundsException: 3 > at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) > at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) > at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) > at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) > at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) > at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) > at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) > at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) > at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) > at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) > at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:680) > I'll submit a schema, and steps to reproduce. -- 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