You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/02 08:35:21 UTC
[GitHub] [pulsar] candlerb opened a new issue #5539: Bulk admin operations
for function state
candlerb opened a new issue #5539: Bulk admin operations for function state
URL: https://github.com/apache/pulsar/issues/5539
**Is your feature request related to a problem? Please describe.**
At the moment you can only `querystate` if you know in advance the name of the key you're looking for.
So I would like to be able to:
* List / iterate over all stored state belonging to a function
* Delete all stored state belonging to a function
It is apparently possible via bk interfaces.
**Describe the solution you'd like**
Add commands to pulsar-admin / REST API
* list all keys/values (which could be millions of keys; would need some sort of paging mechanism in the API)
I noticed[^1] that `GET /admin/v3/functions/public/default/<functionname>/state` (without a key) currently returns a 404 - maybe it could be used to return the first N key/value pairs
* Delete all state for a given function
Note: whilst the Pulsar functions context object has `deleteState`, there is currently no way from the CLI to delete even a single key, so that ought to be rectified too.
**Describe alternatives you've considered**
Document the bk way of doing this, with examples.
-----
[^1] Found using pulsarctl:
```
./pulsarctl functions querystate --name womble
error: Unknown pulsar error
```
and tcpdump:
```
GET /admin/v3/functions/public/default/womble/state HTTP/1.1
Host: localhost:8080
User-Agent: Pulsarctl-Go-v0.1.0
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip
HTTP/1.1 404 Not Found
Date: Sat, 02 Nov 2019 08:27:18 GMT
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 0
Server: Jetty(9.4.12.v20180830)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services