[
https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918652#action_12918652
]
Jonathan Ellis commented on CASSANDRA-1580:
-------------------------------------------
some things that give nonsense errors:
{code}
defa...@unknown] set CF2[a]
line 0:-1 mismatched input '<EOF>' expecting '='
Invalid Statement (Type: 0)
defa...@unknown] set CF2[a]=
line 0:-1 mismatched input '<EOF>' expecting set null
Not authenticated to a working keyspace.
defa...@keyspace1] set CF2[a][b]='asd
line 1:18 mismatched character '<EOF>' expecting '''
line 0:-1 mismatched input '<EOF>' expecting set null
Exception null
[defa...@keyspace1] crea
line 1:0 no viable alternative at input 'crea'
Invalid Statement (Type: 0)
[defa...@keyspace1] create keyspace 'as
line 1:19 mismatched character '<EOF>' expecting '''
line 0:-1 mismatched input '<EOF>' expecting Identifier
Exception Required field 'name' was not present! Struct: KsDef(name:null,
strategy_class:org.apache.cassandra.locator.SimpleStrategy,
replication_factor:1, cf_defs:[])
[defa...@unknown] create keyspace 'asdf'
line 1:16 mismatched input ''asdf'' expecting Identifier
Exception Required field 'replication_factor' was not found in serialized data!
Struct: KsDef(name:null, strategy_class:null, replication_factor:0,
cf_defs:null)
[server logs org.apache.thrift.protocol.TProtocolException and session dies]
[defa...@unknown] create keyspace asdf2 wi
line 1:22 extraneous input 'wi' expecting EOF
e7f83b12-d183-11df-84e7-e700f669bcfc
[note keyspace still got created which it should not have been]
[defa...@unknown] create keyspace asdf3 with k
line 0:-1 mismatched input '<EOF>' expecting '='
Exception in thread "main" java.lang.AssertionError
[this is an example of where we should not be exposing assertion messages]
{code}
Experiment and see what others you can find.
> make cli less crashy
> --------------------
>
> Key: CASSANDRA-1580
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1580
> Project: Cassandra
> Issue Type: New Feature
> Components: Tools
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Fix For: 0.7.1
>
> Attachments: CASSANDRA-1580.patch
>
>
> the cli tends to throw an exception and die when it gets unexpected input.
> this is not very user-friendly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.