[jira] [Commented] (SOLR-12327) 'bin/solr status' should be able to produce output as pure JSON

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (SOLR-12327) 'bin/solr status' should be able to produce output as pure JSON

JIRA jira@apache.org

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

Jason Gerlowski commented on SOLR-12327:

1. Thanks for posting your workaround.

2. I agree that this JIRA should be closed as "Not a Problem", since you have a workaround.  But I think you hit on a real problem here.  Or at least, a real area for improvement.  The {{bin/solr}} scripts offer a lot of functionality to administrators, but the output format often makes it tough to script around that functionality.  Some commands are more prone to this than others, and there often workarounds via API calls.  But improving this might be a nice usability improvement at some point in the future.  Definitely the work of a separate JIRA.  Just mentioning it here as this brought it to mind.

> 'bin/solr status' should be able to produce output as pure JSON
> ---------------------------------------------------------------
>                 Key: SOLR-12327
>                 URL: https://issues.apache.org/jira/browse/SOLR-12327
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: scripts and tools
>    Affects Versions: 7.2
>            Reporter: Simon Rosenthal
>            Priority: Minor
> The 'bin/solr status' command should optionally (so as not to break back compat) produce its outputs in pure JSON, for easier parsing, rather than a mixture of free text and JSON as it does at present.
> e.g.
> {{prompt# bin/solr status purejson}}
> {{ {}}
> {{# these two lines replace "Solr process xxxx on port yyyy"}}
> {{ *"solr_port":"8983",*}}
> {{ *"solr_pid":"14020",*}}
> {{ "solr_home":"/home/user/solr-7.2.1/server/solr",}}
> {{ "version":"7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:54:21",}}
> {{ "startTime":"2018-05-02T13:51:43.388Z",}}
> {{ "uptime":"5 days, 2 hours, 39 minutes, 35 seconds",}}
> {{ "memory":"1.2 GB (%25.7) of 4.8 GB",}}
> {{ "cloud":{}}
> {{ "ZooKeeper":"localhost:9983",}}
> {{ "liveNodes":"1",}}
> {{ "collections":"1"}}}}
> The use case here is mapping a solr port (where that is the only available information about the Solr instance) to ZK host/port(s) for a subsequent call to zkcli.sh.
> {{ }}

This message was sent by Atlassian JIRA

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