cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuki Morishita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9031) nodetool info -T throws ArrayOutOfBounds when the node has not joined the cluster
Date Mon, 30 Mar 2015 23:58:53 GMT

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

Yuki Morishita commented on CASSANDRA-9031:
-------------------------------------------

Thanks for the patch.
Although your patch makes it clear tokens are not available yet, I think it'd be better to
skip showing DC/Rack info rather than throwing exception.
In addition to your patch, adding token check before displaying DC/Rack in {{NodeCmd#printInfo}}
would be nice.

WDYT?

> nodetool info -T throws ArrayOutOfBounds when the node has not joined the cluster
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9031
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9031
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Ron Kuris
>             Fix For: 3.0, 2.1.4, 2.0.14
>
>         Attachments: patch.txt
>
>
> To reproduce, bring up a node that does not join the cluster, either using -Dcassandra.write_survey=true
or -Dcassandra.join_ring=false, then run 'nodetool info -T'. You'll get the following stack
trace:
> {code}ID                     : e384209f-f7a9-4cff-8fd5-03adfaa0d846
> Gossip active          : true
> Thrift active          : true
> Native Transport active: true
> Load                   : 76.69 KB
> Generation No          : 1427229938
> Uptime (seconds)       : 728
> Heap Memory (MB)       : 109.93 / 826.00
> Off Heap Memory (MB)   : 0.01
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
> 	at java.util.ArrayList.get(ArrayList.java:411)
> 	at org.apache.cassandra.tools.NodeProbe.getEndpoint(NodeProbe.java:676)
> 	at org.apache.cassandra.tools.NodeProbe.getDataCenter(NodeProbe.java:694)
> 	at org.apache.cassandra.tools.NodeCmd.printInfo(NodeCmd.java:666)
> 	at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1277){code}
> After applying the attached patch, the new error is:
> {code}ID                     : a7d76a2a-82d2-4faa-94e1-a30df6663ebb
> Gossip active          : true
> Thrift active          : false
> Native Transport active: false
> Load                   : 89.36 KB
> Generation No          : 1427231804
> Uptime (seconds)       : 12
> Heap Memory (MB)       : 135.49 / 826.00
> Off Heap Memory (MB)   : 0.01
> Exception in thread "main" java.lang.RuntimeException: This node does not have any tokens.
Perhaps it is not part of the ring?
> 	at org.apache.cassandra.tools.NodeProbe.getEndpoint(NodeProbe.java:678)
> 	at org.apache.cassandra.tools.NodeProbe.getDataCenter(NodeProbe.java:698)
> 	at org.apache.cassandra.tools.NodeCmd.printInfo(NodeCmd.java:676)
> 	at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1313){code}



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

Mime
View raw message