[
https://issues.apache.org/jira/browse/CASSANDRA-12698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899409#comment-17899409
]
Maxwell Guo commented on CASSANDRA-12698:
-----------------------------------------
I found that the output for nodetool may be like :
{code:java}
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID
Rack
UN 127.0.0.1 266.26 KiB 16 100.0%
6d194555-f6eb-41d0-c000-000000000001 rack1
{code}
If the output format is organized according to key value, it will be easier to
organize into JSON or yaml.
But I found that :
{code:java}
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
{code}
Not very good organized by key-value, and So I personally suggest that if it is
json or yaml output:
1. Do not display these (actually an introduction to Status and Stats) , just
remove
{code:java}
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving"
{code}
when -F is used
2. Display them at the very begining, like :
{code:java}
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
{"datacenters":
{"datacenter1":
{"127.0.0.3":
{"rack":"rack1",
"load":"174,88 KiB",
"owns":"66,7%",
"tokens":"1",
"state":"N",
"host_id":"46b7c2ad-0c3b-4603-8ff9-4bccf3684422",
"status":"U",
"owns_effective":"true"},
"errors":""}
{code}
And if -F is not used , we can guarantee that the result is the same as before,
so I think this does not modify the output format of nodetool status.
[~brandon.williams] [~mmuzaf] [~smiklosovic] What's your opinion?
> add json/yaml format option to nodetool status
> ----------------------------------------------
>
> Key: CASSANDRA-12698
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12698
> Project: Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Shogo Hoshii
> Assignee: Maxwell Guo
> Priority: Normal
> Fix For: 5.x
>
> Attachments: ntstatus_json.patch, sample.json, sample.yaml
>
>
> Hello,
> This patch enables nodetool status to be output in json/yaml format.
> I think this format could be useful interface for tools that operate or
> deploy cassandra.
> The format could free tools from parsing the result in their own way.
> It would be great if someone would review this patch.
> Thank you.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]