You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/10/05 23:18:32 UTC
[jira] Created: (CASSANDRA-1580) make cli less crashy
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
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.
[jira] Commented: (CASSANDRA-1580) make cli less crashy
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920209#action_12920209 ]
Hudson commented on CASSANDRA-1580:
-----------------------------------
Integrated in Cassandra #563 (See [https://hudson.apache.org/hudson/job/Cassandra/563/])
> 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.0
>
> Attachments: CASSANDRA-1580-v2.patch, 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.
[jira] Commented: (CASSANDRA-1580) make cli less crashy
Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918640#action_12918640 ]
Pavel Yaskevich commented on CASSANDRA-1580:
--------------------------------------------
As you can see error message won't look like an exception, but if you add --debug option it will print you stacktrace. Can you please point me on the places where it's broken? Thanks!
> 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.
[jira] Commented: (CASSANDRA-1580) make cli less crashy
Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918666#action_12918666 ]
Pavel Yaskevich commented on CASSANDRA-1580:
--------------------------------------------
Please check if you applied my patch correctly, I have completely changed parser error messages + it won't go any further if parser faced an error, so scenarios like "Exception null", "Invalid Statement (Type: 0)", "Exception Required field ..." etc. are imposible.
> 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.
[jira] Updated: (CASSANDRA-1580) make cli less crashy
Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Yaskevich updated CASSANDRA-1580:
---------------------------------------
Attachment: CASSANDRA-1580-v2.patch
reportError was overridden for the parser too, that will fix assert errors and bogus error messages.
> 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-v2.patch, 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.
[jira] Commented: (CASSANDRA-1580) make cli less crashy
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ 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}
default@unknown] set CF2[a]
line 0:-1 mismatched input '<EOF>' expecting '='
Invalid Statement (Type: 0)
default@unknown] set CF2[a]=
line 0:-1 mismatched input '<EOF>' expecting set null
Not authenticated to a working keyspace.
default@Keyspace1] set CF2[a][b]='asd
line 1:18 mismatched character '<EOF>' expecting '''
line 0:-1 mismatched input '<EOF>' expecting set null
Exception null
[default@Keyspace1] crea
line 1:0 no viable alternative at input 'crea'
Invalid Statement (Type: 0)
[default@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:[])
[default@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]
[default@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]
[default@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.
[jira] Updated: (CASSANDRA-1580) make cli less crashy
Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Yaskevich updated CASSANDRA-1580:
---------------------------------------
Attachment: CASSANDRA-1580.patch
> 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.