[
https://issues.apache.org/jira/browse/SOLR-13942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063244#comment-17063244
]
Jan Høydahl commented on SOLR-13942:
------------------------------------
Just a quick note that if you need to script access to ZK you can probably do
lots of stuff based on the verbose output of /admin/zookeeper, with some help
of {{jq}}, examples:
{code}
# get list of live nodes:
curl -s "http://localhost:8983/solr/admin/zookeeper?path=/live_nodes" | jq
'.tree[0].children[].data.title'
# list files in _default configset
curl -s
"http://localhost:8983/solr/admin/zookeeper?path=/configs/_default&detail=true"
| jq '.tree[0].children[].data.title'
# output content of /configs/_default/synonyms.txt
curl -s
"http://localhost:8983/solr/admin/zookeeper?path=/configs/_default/synonyms.txt&detail=true"
| jq -r '.znode.data'
{code}
> /api/cluster/zk/* to fetch raw ZK data
> --------------------------------------
>
> Key: SOLR-13942
> URL: https://issues.apache.org/jira/browse/SOLR-13942
> Project: Solr
> Issue Type: New Feature
> Components: v2 API
> Reporter: Noble Paul
> Assignee: Noble Paul
> Priority: Minor
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> example
> download the {{state.json}} of
> {code}
> GET http://localhost:8983/api/cluster/zk/collections/gettingstarted/state.json
> {code}
> get a list of all children under {{/live_nodes}}
> {code}
> GET http://localhost:8983/api/cluster/zk/live_nodes
> {code}
> If the requested path is a node with children show the list of child nodes
> and their meta data
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]