momo-jun commented on code in PR #544:
URL: https://github.com/apache/pulsar-site/pull/544#discussion_r1180173085


##########
docs/functions-runtime-process.md:
##########
@@ -22,3 +22,37 @@ functionRuntimeFactoryConfigs:
 ```
 
 For more details, see 
[code](https://github.com/apache/pulsar/blob/master/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntimeFactoryConfig.java).
+
+### Set runtime parameter with configuration file
+
+Pulsar Functions now supports setting runtime parameters using a configuration 
file **in Python**. 
+
+**Example**
+
+You can start a Python runtime using the configuration file `config.ini` with 
the following command.
+
+```shell
+pulsar-admin functions localrun \
+  --py /path/to/python_instance.py \
+  --config-file /path/to/config.ini \
+  --classname MyFunction \
+  --logging_leve debug \
+  --inputs persistent://public/default/my-input-topic \
+  --output persistent://public/default/my-output-topic \
+  --log-topic persistent://public/default/functions-logs
+```
+
+` --config-file` is the path to the configuration file. Note that:
+
+- The ` --config-file` should be written in `.ini` format, with each parameter 
being configured as `key = value`. 
+
+    **Example**
+
+    ```ini
+    [DEFAULT]
+    logging_level = info
+    max_pending_async_requests = 1000
+    max_concurrent_requests = 50
+    ```
+
+- When starting with the ` --config-file`, all parameters can be set in the ` 
--config-file`. If you specify parameters on the command line that are also 
present in the ` --config-file`, the values of the parameters on the command 
line will **take precedence over** the values in the ` --config-file`. Like in 
the example above, the `logging_level` is set to `debug`.

Review Comment:
   ```suggestion
   - When you set a parameter through both the configuration file and the 
command line, like `logging_level` in the example above, the value set through 
the command line will **take precedence over** the one set through the 
configuration file. As a result, the value of `logging_level` is `debug`.
   ```



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