[
https://issues.apache.org/jira/browse/CASSANDRA-5302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michał Michalski updated CASSANDRA-5302:
----------------------------------------
Attachment: 5302-v2.patch
Good point! Friday afternoon is not a good day for being really pedantic! ;-)
Fixed. Now it finds the longest address in whole cluster.
{noformat}michal@aperture$ ccm node1 status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Owns (effective) Host ID
Token Rack
UN 127.0.0.1 55,16 KB 16,7%
431232e7-d443-43f3-b39a-af8435172dcf -9223372036854775808
RAC1
UN 127.0.0.222 55,85 KB 16,7%
8225e6a1-c250-48cd-9fff-20964192011c -6148914691236517206
RAC2
UN 127.0.0.3 55,84 KB 16,7%
5bb7b619-d291-4a8b-a7f6-048198f03b50 -3074457345618258604
RAC1
Datacenter: DC2
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Owns (effective) Host ID
Token Rack
UN 127.0.0.5 70,5 KB 16,7%
36505fd0-63d0-4ca4-9187-548b83a80acf 3074457345618258600
RAC1
UN 127.0.0.6 70,48 KB 16,7%
d1157f0b-4f58-4161-b6ec-42b1ad30b62a 6148914691236517202
RAC2
UN 127.0.0.44 55,13 KB 16,7%
1775598c-5bb9-4e17-8ead-d752193e00e5 -2
RAC2
michal@aperture$ ccm node1 ring
Datacenter: DC1
==========
Replicas: 0
Address Rack Status State Load Owns
Token
-3074457345618258604
127.0.0.1 RAC1 Up Normal 55,16 KB 16,67%
-9223372036854775808
127.0.0.222 RAC2 Up Normal 55,85 KB 16,67%
-6148914691236517206
127.0.0.3 RAC1 Up Normal 55,84 KB 16,67%
-3074457345618258604
Datacenter: DC2
==========
Replicas: 0
Address Rack Status State Load Owns
Token
-2
127.0.0.5 RAC1 Up Normal 70,5 KB 16,67%
3074457345618258600
127.0.0.6 RAC2 Up Normal 70,48 KB 16,67%
6148914691236517202
127.0.0.44 RAC2 Up Normal 55,13 KB 16,67% -2
{noformat}
> Fix nodetool ring and status output format for IPv6 addresses
> -------------------------------------------------------------
>
> Key: CASSANDRA-5302
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5302
> Project: Cassandra
> Issue Type: Improvement
> Components: Tools
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: 5302.patch, 5302-v2.patch
>
>
> My pedantic nature can't stand having unaligned columns in nodetool outputs,
> which happens when IP addresses are IPv6 ones:
> {noformat}michal@aperture$ nodetool -h myhost status
> Datacenter: DC1
> ==================
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> -- Address Load Owns (effective) Host ID
> Token Rack
> UN 2001:3c27:21:166:0:1:2:7 331.65 GB 100,0%
> d557fb83-72f2-4e92-9f26-de6c788aada5 85070591730234615865843651857942052864
> rack2
> UN 2001:3c27:21:166:0:1:1:7 328.8 GB 100,0%
> 0461a4bf-97a6-447d-9d06-3b42ad1f702c 0
> rack1
> {noformat}
> I'm attaching a patch that fixes this problem for nodetool status / ring
> commands. It does it by picking first item in nodes list (for nodetool ring
> it's first node in general, for nodetool status it's first node in each DC)
> and uses its length as a field length for output.
> It bases on assumptions that it's imppossible to have 0 nodes in cluster/DC
> and the lenghts of addresses are "similar". The alternative I'm considering
> too is finding the longest address - it will be 100% accurate.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira