You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mark Wolfe (JIRA)" <ji...@apache.org> on 2010/02/17 22:19:27 UTC

[jira] Created: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Improve cassandra-cli error display and thrift connection checking
------------------------------------------------------------------

                 Key: CASSANDRA-807
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
             Project: Cassandra
          Issue Type: Improvement
          Components: Tools
         Environment: Java
            Reporter: Mark Wolfe


A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.

So I suggest the following enhancements:
* Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
* Hide as many of the stack traces as possible displaying a simple error message
* Implement a --debug argument to the CLI which will output stacktraces


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837294#action_12837294 ] 

Eric Evans commented on CASSANDRA-807:
--------------------------------------

> I don't suppose this fixes CASSANDRA-738 too?

It doesn't, no.

> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Mark Wolfe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Wolfe updated CASSANDRA-807:
---------------------------------

    Attachment: cassandra-cli-cleanup.patch

The attached file contains changes based on this issue as well as:
* More internal java doc for methods in this area
* A bit of a tidy up of code in the classes which were modified 
* Removal of some redundant code which wasn't used


> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836313#action_12836313 ] 

Eric Evans commented on CASSANDRA-807:
--------------------------------------

You've added a call to get_string_property() that is otherwise not needed in order to force connection errors to happen sooner. I wonder if it wouldn't be better to just stop using the misleading term "connect(ed)" instead? There is also an impending change in the pipeline that will make the login() method required, I'd also be open to implementing that behavior in the cli now as a solution to this.

Also, Cassandra's coding conventions put opening braces on a line of their own and this patch moves a number of them up one line. Please see the http://wiki.apache.org/cassandra/CodeStyle.


> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Mark Wolfe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835009#action_12835009 ] 

Mark Wolfe commented on CASSANDRA-807:
--------------------------------------

Just to illustrate what this looks like..

cassandra-trunk markw$ bin/cassandra-cli 
Welcome to cassandra CLI.

Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
cassandra> connect localhostss/9160
Exception connecting to localhostss/9160 - java.net.UnknownHostException: localhostss
cassandra> connect localhost/8888  
Exception retrieving cluster name, check you have connected to the thrift port.
cassandra> connect localhost/9160
Connected to localhost/9160 cluster - Test Cluster
cassandra> exit
cassandra-trunk markw$ 

> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837550#action_12837550 ] 

Eric Evans edited comment on CASSANDRA-807 at 2/24/10 12:43 AM:
----------------------------------------------------------------

committed w/ minor modifications; thanks!

      was (Author: urandom):
    committed; thanks!
  
> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>            Assignee: Mark Wolfe
>             Fix For: 0.6
>
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-807:
-------------------------------------

    Fix Version/s: 0.6

> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>             Fix For: 0.6
>
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837769#action_12837769 ] 

Hudson commented on CASSANDRA-807:
----------------------------------

Integrated in Cassandra #364 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/364/])
    less confusing handling of errors/exceptions

 * replaces some printed exceptions with human readable error messages,
   while re-enabling the printed exceptions if --debug is passed.
 * pull cluster name property on connect or startup, and output, (this
   also forces any connection errors to occur sooner).

Patch by Mark Wolfe; reviewed by eevans for 


> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>            Assignee: Mark Wolfe
>             Fix For: 0.6
>
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837287#action_12837287 ] 

Jonathan Ellis commented on CASSANDRA-807:
------------------------------------------

I don't suppose this fixes CASSANDRA-738 too?

> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Mark Wolfe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Wolfe updated CASSANDRA-807:
---------------------------------

    Attachment:     (was: cassandra-cli-cleanup.patch)

> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-807) Improve cassandra-cli error display and thrift connection checking

Posted by "Mark Wolfe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Wolfe updated CASSANDRA-807:
---------------------------------

    Attachment: cassandra-cli-cleanup.patch

Updated patch which has the following:
- Nailed all the brace layout issues in the files I touched making these changes.
- Corrected the comment relating to retrieval of cluster name in the connect method. Initially I used it to test the connection, then came to the conclusion that displaying this similar to mysql / oracle would be handy.


> Improve cassandra-cli error display and thrift connection checking
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-807
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>         Environment: Java
>            Reporter: Mark Wolfe
>         Attachments: cassandra-cli-cleanup.patch
>
>
> A new user observed that thier was some ambiguous error messages presented by the cassandra CLI if you connected to the wrong port on the cassandra daemon, or in fact anything else listening for a tcp connection. The CLI will say "connected" but when you run any of the commands a thrift exception will be displayed.
> So I suggest the following enhancements:
> * Verify that the CLI is indeed connected to a thrift port by requesting the cluster name
> * Hide as many of the stack traces as possible displaying a simple error message
> * Implement a --debug argument to the CLI which will output stacktraces

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.