Anonymitaet commented on a change in pull request #11335:
URL: https://github.com/apache/pulsar/pull/11335#discussion_r671099622



##########
File path: site2/docs/functions-worker.md
##########
@@ -42,6 +42,38 @@ If authentication is enabled on the BookKeeper cluster, 
configure the following
 - `bookkeeperClientAuthenticationParametersName`: the BookKeeper client 
authentication plugin parameters name.
 - `bookkeeperClientAuthenticationParameters`: the BookKeeper client 
authentication plugin parameters.
 
+### Configure Stateful-Functions to run with broker
+
+If you want to use Stateful-Functions related functions, for example, if you 
want to use `putState()` and `queryState()` related interfaces. 
+
+1. You need to enable the **streamStorage** service in the bookkeeper. 
Currently, the service uses the form of loading the nar package, so you need to 
configure the following in `bookkeeper.conf`:
+
+```text
+extraServerComponents=org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent
+```
+
+After bookie is started, you can use the following methods to check whether 
the streamStorage service is started correctly:
+
+```shell
+telnet localhost 4181
+```
+
+Output:
+
+```text
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+```
+
+2. Turn on this function in `functions_worker.yml`, as follows:
+
+```text
+stateStorageServiceUrl: bk://<bk-service-url>:4181
+```
+
+- bk-service-url: the service url points to bookkeeper table service.

Review comment:
       ```suggestion
   If you want to use Stateful-Functions related functions (for example,  
`putState()` and `queryState()` related interfaces), follow steps below.
                
   1. Enable the **streamStorage** service in the BookKeeper. 
      
      Currently, the service uses the NAR package, so you need to set the 
configuration in `bookkeeper.conf`.
       
       ```text
       
extraServerComponents=org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent
       ```
       
       After starting bookie, use the following methods to check whether the 
streamStorage service is started correctly.
       
       Input
   
       ```shell
       telnet localhost 4181
       ```
   
       Output
   
       ```text
       Trying 127.0.0.1...
       Connected to localhost.
       Escape character is '^]'.
       ```
       
   2. Turn on this function in `functions_worker.yml`.
      
       
       ```text
       stateStorageServiceUrl: bk://<bk-service-url>:4181
       ```
       
       `bk-service-url` is the service URL pointing to the BookKeeper table 
service.
   ```
   
   do you mean this?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to