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

Jimmy Mårdell commented on CASSANDRA-7710:
------------------------------------------

Our particular problem is that we have created our own SeedProvider. When you 
run "nodetool ring" on a production machine, our custom SeedProvider gets 
invoked by the nodetool process (as a side effect of DatabaseDescriptor being 
invoked) which causes some minor issues. This seems like a bug to me; nodetool 
ought to be a pure CLI fetching data through JMX.

Compare the 2.0 implementation (using DatabaseDescriptor.getNumTokens() to 
determine if the cluster uses vnodes):
https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/tools/NodeCmd.java#L296

and the 2.1 implementations (which determines if the cluster uses vnodes by 
counting number of tokens through JMX)
https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/tools/NodeTool.java#L437

The 2.1 implementation is clearly superior and doesn't have side effects. I 
think this should be backported 2.0. I might do this myself, since it doesn't 
seem to so hard.


> nodetool ring throws exception if run on machine without Cassandra
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-7710
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7710
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Jimmy Mårdell
>            Assignee: Michael Shuler
>            Priority: Minor
>
> DatabaseDescriptor.getNumTokens() is invoked in the nodetool ring command 
> which doesn't work so well when running on a machine where Cassandra doesnt' 
> exist. And it has all kind of side effects as well.
> This seems fixed in 2.1 but would be nice if it was fixed in 2.0 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to