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

Manish M Pillai commented on CASSANDRA-20104:
---------------------------------------------

Hi [~smiklosovic] 
I am unable to run distributed in-jvm dtest for testing the nodetool status 
with sorting option commands .
I am using this command as mentioned in cassandra docs:

ant test-jvm-dtest-some  -Duse.jdk11=true 
-Dtest.name=org.apache.cassandra.distributed.test.NodeToolStatusTest

I tried to Debug but was not able to find a solution for it. Could you help 
diagnose this issue

Error:

test-jvm-dtest-some:
    [mkdir] Created dir: /home/manishksi220/1Work/Cassandra 
_Source/CASSANDRA_20104_Nodetool _Status_Sort/cassandra/build/test/cassandra
    [mkdir] Created dir: /home/manishksi220/1Work/Cassandra 
_Source/CASSANDRA_20104_Nodetool _Status_Sort/cassandra/build/test/output
    [mkdir] Created dir: /home/manishksi220/1Work/Cassandra 
_Source/CASSANDRA_20104_Nodetool _Status_Sort/cassandra/build/tmp
[junit-timeout] Error occurred during initialization of VM
[junit-timeout] agent library failed to init: instrument
[junit-timeout] Error opening zip file or JAR manifest missing : 
/home/manishksi220/1Work/Cassandra
[junit-timeout] Testsuite: 
org.apache.cassandra.distributed.test.NodeToolStatusTest-cassandra.testtag_IS_UNDEFINED
[junit-timeout] Testsuite: 
org.apache.cassandra.distributed.test.NodeToolStatusTest-cassandra.testtag_IS_UNDEFINED
 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit-timeout] 
[junit-timeout] Testcase: 
org.apache.cassandra.distributed.test.NodeToolStatusTest:null-cassandra.testtag_IS_UNDEFINED:
 Caused an ERROR
[junit-timeout] Forked Java VM exited abnormally. Please note the time in the 
report does not reflect the time until the VM exit.
[junit-timeout] junit.framework.AssertionFailedError: Forked Java VM exited 
abnormally. Please note the time in the report does not reflect the time until 
the VM exit.
[junit-timeout]         at 
jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[junit-timeout]         at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit-timeout]         at java.base/java.util.Vector.forEach(Vector.java:1394)
[junit-timeout]         at 
jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[junit-timeout]         at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit-timeout]         at 
jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[junit-timeout]         at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit-timeout]         at java.base/java.util.Vector.forEach(Vector.java:1394)
[junit-timeout]         at 
jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[junit-timeout]         at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit-timeout]         at 
jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[junit-timeout]         at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit-timeout] 
[junit-timeout] 
[junit-timeout] Test org.apache.cassandra.distributed.test.NodeToolStatusTest 
FAILED (crashed)

BUILD FAILED
/home/manishksi220/1Work/Cassandra _Source/CASSANDRA_20104_Nodetool 
_Status_Sort/cassandra/build.xml:1825: The following error occurred while 
executing this line:
/home/manishksi220/1Work/Cassandra _Source/CASSANDRA_20104_Nodetool 
_Status_Sort/cassandra/build.xml:1651: Some test(s) failed.

> Sort output in nodetool status
> ------------------------------
>
>                 Key: CASSANDRA-20104
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20104
>             Project: Apache Cassandra
>          Issue Type: New Feature
>          Components: Tool/nodetool
>            Reporter: Stefan Miklosovic
>            Assignee: Manish M Pillai
>            Priority: Normal
>             Fix For: 5.x
>
>         Attachments: image-2024-12-11-17-23-40-536.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Lets have this output:
> {code}
> nodetool status
> Datacenter: dc1
> ===============
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address     Load        Tokens  Owns (effective)  Host ID                 
>               Rack 
> UN  172.19.0.9  385.29 KiB  256     66.6%             
> 6d194555-f6eb-41d0-c000-000000000003  rack3
> UN  172.19.0.5  609.07 KiB  256     68.4%             
> 6d194555-f6eb-41d0-c000-000000000001  rack1
> UN  172.19.0.8  377.5 KiB   256     65.0%             
> 6d194555-f6eb-41d0-c000-000000000002  rack2
> {code}
> This is a very simple case but it will serve well for the explanation.
> What I would like to see is to have this output sorted. If I am looking for a 
> particular node, e.g. by IP address, these entries are not sorted by IP in 
> general, so when I have 20-nodes cluster and I want to check a particular 
> node, it is like a needle in a haystack so I would welcome if they are 
> ordered by IP.
> This can be generalized to other columns - sort by Load, for example, to see 
> what nodes are the most loaded ones, sort by host id would be cool too. TCM 
> introduced kind of predictable node ids so sorting them should give you the 
> order in which nodes have been added etc.
> There might be a new switch added like "--sort=ip/id/load/rack". For loads, 
> it would sort it from the most loaded one to least loaded one. For IPs and 
> IDs, it would sort them from the "lowest" to the "highest" node in terms of 
> IP address and ID. We might also group nodes by rack and by node id inside a 
> rack.
> This should be done _per DC_. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to