Hello Brian,
Replying to your questions inline below:
> (1) When I do putState("foo", val), what's the scope of the name "foo"? Just
> this function, or all functions in this tenant/namespace, or something else?
The state is scoped to the specific function
> (2) Is getState("foo") distinct from getCounter("foo"), or do they share the
> same namespace?
You have already answered this.
> (3) Is there a CLI tool which can be used to examine state? Or do I have to
> write a pulsar function and send queries to it via a topic?
You can use the pulsar-admin cli to interact with Pulsar function's state e.g.
./bin/pulsar-admin functions querystate
or
./bin/pulsar-admin functions putstate
Best,
Jerry
On Thu, Oct 31, 2019 at 11:36 AM Brian Candler <[email protected]> wrote:
>
> On 31/10/2019 18:09, Brian Candler wrote:
> > (2) Is getState("foo") distinct from getCounter("foo"), or do they
> > share the same namespace?
>
> I've tested it, and they are: counters are just 64-bit values, big-endian.
>
> get_counter("foo") => 460
>
> get_state("foo") => b'\x00\x00\x00\x00\x00\x00\x01\xcc'
>
> Also, Java API has "deleteState" but Python API has "del_counter" so
> they're clearly the same thing.
>