cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9729) CQLSH exception - OverflowError: normalized days too large to fit in a C int
Date Tue, 14 Jul 2015 15:45:04 GMT

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

Tyler Hobbs commented on CASSANDRA-9729:
----------------------------------------

bq. It would be possible override this for cqlsh and return numeric types for timestamp. Worth
doing Tyler Hobbs?

Hmm, I'm not sure if that's worth doing just to make bogus data presentable in cqlsh, especially
since {{timestampAsBlob()}} is just about as useful.  I'd be more inclined to get a better
error message from the python driver.  We could catch {{OverflowError}} in {{DateType.deserialize()}}
and use {{time.strftime()}} (which is what cqlsh used in 2.0) to present the datestamp in
the error message.

Ideally, we could have the driver indicate which column caused the error.  I think I avoided
that originally because of the performance impact of replacing the row deserialization list
comprehension with a for-loop wasn't worth it.  Thinking about it now, we could keep the list
comprehension, but if we catch an exception, switch to a for-loop on that row just to present
a better error message.  What do you think?

> CQLSH exception - OverflowError: normalized days too large to fit in a C int
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9729
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9729
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: OSX 10.10.2
>            Reporter: Chandran Anjur Narasimhan
>              Labels: cqlsh
>             Fix For: 2.1.x
>
>
> Running a select command using CQLSH 2.1.5, 2.1.7 throws exception. This works nicely
in 2.0.14 version.
> Environment:
> ============
> JAVA - 1.8
> Python - 2.7.6
> Cassandra Server - 2.1.7
> CQLSH - 5.0.1
> Logs:
> ======
> CQLSH - cassandra 2.0.14 - working with no issues
> -------------------------------------
> {noformat}
> NCHAN-M-D0LZ:apache nchan$ cd apache-cassandra-2.0.14/
> NCHAN-M-D0LZ:apache-cassandra-2.0.14 nchan$ bin/cqlsh
> Connected to CCC Multi-Region Cassandra Cluster at <myip>:9160.
> [cqlsh 4.1.1 | Cassandra 2.1.7 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
> Use HELP for help.
> cqlsh> use ccc;
> cqlsh:ccc> select count(*) from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
>  count
> -------
>     25
> (1 rows)
> cqlsh:ccc> select * from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
> < i get all the 25 values>
> {noformat}
> CQLSH - cassandra 2.1.5  - python exception
> -------------------------------------
> {noformat}
> NCHAN-M-D0LZ:apache-cassandra-2.1.5 nchan$ bin/cqlsh
> Connected to CCC Multi-Region Cassandra Cluster at <ip-address>:9042.
> [cqlsh 5.0.1 | Cassandra 2.1.7 | CQL spec 3.2.0 | Native protocol v3]
> Use HELP for help.
> cqlsh> use ccc;
> cqlsh:ccc> select count(*) from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
>  count
> -------
>     25
> (1 rows)
> cqlsh:ccc> select * from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
> Traceback (most recent call last):
>   File "bin/cqlsh", line 1001, in perform_simple_statement
>     rows = self.session.execute(statement, trace=self.tracing_enabled)
>   File "/Users/nchan/Programs/apache/apache-cassandra-2.1.5/bin/../lib/cassandra-driver-internal-only-2.5.0.zip/cassandra-driver-2.5.0/cassandra/cluster.py",
line 1404, in execute
>     result = future.result(timeout)
>   File "/Users/nchan/Programs/apache/apache-cassandra-2.1.5/bin/../lib/cassandra-driver-internal-only-2.5.0.zip/cassandra-driver-2.5.0/cassandra/cluster.py",
line 2974, in result
>     raise self._final_exception
> OverflowError: normalized days too large to fit in a C int
> cqlsh:ccc> 
> {noformat}
> CQLSH - cassandra 2.1.7 - python exception
> -------------------------------------
> {noformat}
> NCHAN-M-D0LZ:apache-cassandra-2.1.7 nchan$ bin/cqlsh
> Connected to CCC Multi-Region Cassandra Cluster at 171.71.189.11:9042.
> [cqlsh 5.0.1 | Cassandra 2.1.7 | CQL spec 3.2.0 | Native protocol v3]
> Use HELP for help.
> cqlsh> use ccc;
> cqlsh:ccc> select count(*) from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
>  count
> -------
>     25
> (1 rows)
> cqlsh:ccc> select * from task_result where submissionid='40f89a3d1f4711e5ac2b005056bb0e8b';
> Traceback (most recent call last):
>   File "bin/cqlsh", line 1041, in perform_simple_statement
>     rows = self.session.execute(statement, trace=self.tracing_enabled)
>   File "/Users/nchan/Programs/apache/apache-cassandra-2.1.7/bin/../lib/cassandra-driver-internal-only-2.5.1.zip/cassandra-driver-2.5.1/cassandra/cluster.py",
line 1405, in execute
>     result = future.result(timeout)
>   File "/Users/nchan/Programs/apache/apache-cassandra-2.1.7/bin/../lib/cassandra-driver-internal-only-2.5.1.zip/cassandra-driver-2.5.1/cassandra/cluster.py",
line 2976, in result
>     raise self._final_exception
> OverflowError: normalized days too large to fit in a C int
> cqlsh:ccc> 
> {noformat}



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

Mime
View raw message