This is an automated email from the ASF dual-hosted git repository.
hjf pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d3076f2 Fix functions-worker typos (#7746)
d3076f2 is described below
commit d3076f21b088a7062659d144b3f6b3efdacb848b
Author: sijia-w <[email protected]>
AuthorDate: Wed Aug 5 08:33:54 2020 +0200
Fix functions-worker typos (#7746)
* Update functions-worker.md
* Update functions-worker.md
* Update site2/docs/functions-worker.md
Co-authored-by: Jennifer Huang
<[email protected]>
---
site2/docs/functions-worker.md | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/site2/docs/functions-worker.md b/site2/docs/functions-worker.md
index 35bfd9a..7970782 100644
--- a/site2/docs/functions-worker.md
+++ b/site2/docs/functions-worker.md
@@ -5,7 +5,7 @@ sidebar_label: "Setup: Pulsar Functions Worker"
---
Before using Pulsar Functions, you need to learn how to set up Pulsar
Functions worker and how to [configure Functions
runtime](functions-runtime.md).
-Pulsar `functions-worker` is a logic component to run Pulsar Functions in
cluster mode. Two options are available, and you can select either of the two
options based on your requirements.
+Pulsar `functions-worker` is a logic component to run Pulsar Functions in
cluster mode. Two options are available, and you can select either based on
your requirements.
- [run with brokers](#run-functions-worker-with-brokers)
- [run it separately](#run-functions-worker-separately) in a different broker
@@ -24,16 +24,16 @@ To enable functions-worker running as part of a broker, you
need to set `functio
functionsWorkerEnabled=true
```
-When you set `functionsWorkerEnabled` to `true`, it means that you start
functions-worker as part of a broker. You need to configure the
`conf/functions_worker.yml` file to customize your functions_worker.
+If the `functionsWorkerEnabled` is set to `true`, the functions-worker is
started as part of a broker. You need to configure the
`conf/functions_worker.yml` file to customize your functions_worker.
Before you run Functions-worker with broker, you have to configure
Functions-worker, and then start it with brokers.
### Configure Functions-Worker to run with brokers
-In this mode, since `functions-worker` is running as part of broker, most of
the settings already inherit from your broker configuration (for example,
configurationStore settings, authentication settings, and so on).
+In this mode, most of the settings are already inherited from your broker
configuration (for example, configurationStore settings, authentication
settings, and so on) since `functions-worker` is running as part of the broker.
Pay attention to the following required settings when configuring
functions-worker in this mode.
-- `numFunctionPackageReplicas`: The number of replicas to store function
packages. The default value is `1`, which is good for standalone deployment.
For production deployment, to ensure high availability, set it to be more than
`2` .
+- `numFunctionPackageReplicas`: The number of replicas to store function
packages. The default value is `1`, which is good for standalone deployment.
For production deployment, to ensure high availability, set it to be larger
than `2`.
- `pulsarFunctionsCluster`: Set the value to your Pulsar cluster name (same as
the `clusterName` setting in the broker configuration).
If authentication is enabled on the BookKeeper cluster, configure the
following BookKeeper authentication settings.
@@ -52,7 +52,7 @@ And then you can use the following command to verify if
`functions-worker` is ru
curl <broker-ip>:8080/admin/v2/worker/cluster
```
-After entering the command above, a list of active function workers in the
cluster is returned. The output is something similar as follows.
+After entering the command above, a list of active function workers in the
cluster is returned. The output is similar to the following.
```json
[{"workerId":"<worker-id>","workerHostname":"<worker-hostname>","port":8080}]
@@ -65,7 +65,7 @@ This section illustrates how to run `functions-worker` as a
separate process in

> Note
-In this mode, make sure `functionsWorkerEnabled` is set to `false`, so you
won't start `functions-worker` with brokers by mistake.
+> In this mode, make sure `functionsWorkerEnabled` is set to `false`, so you
won't start `functions-worker` with brokers by mistake.
### Configure Functions-worker to run separately
@@ -73,7 +73,7 @@ To run function-worker separately, you have to configure the
following parameter
#### Worker parameters
-- `workerId`: The type is string. It is unique across clusters, used to
identify a worker machine.
+- `workerId`: The type is string. It is unique across clusters, which is used
to identify a worker machine.
- `workerHostname`: The hostname of the worker machine.
- `workerPort`: The port that the worker server listens on. Keep it as default
if you don't customize it.
- `workerPortTls`: The TLS port that the worker server listens on. Keep it as
default if you don't customize it.
@@ -122,9 +122,10 @@ For details on TLS encryption, refer to [Transport
Encryption using TLS](securit
##### Enable Authentication Provider
-To enable authentication on Functions Worker, configure the following settings.
+To enable authentication on Functions Worker, you need to configure the
following settings.
+
> Note
-Substitute the *providers list* with the providers you want to enable.
+> Substitute the *providers list* with the providers you want to enable.
```
authenticationEnabled: true
@@ -133,6 +134,7 @@ authenticationProviders: [ provider1, provider2 ]
For *TLS Authentication* provider, follow the example below to add the
necessary settings.
See [TLS Authentication](security-tls-authentication.md) for more details.
+
```
brokerClientAuthenticationPlugin:
org.apache.pulsar.client.impl.auth.AuthenticationTls
brokerClientAuthenticationParameters:
tlsCertFile:/path/to/admin.cert.pem,tlsKeyFile:/path/to/admin.key-pk8.pem
@@ -150,7 +152,7 @@ properties:
saslJaasBrokerSectionName: Broker
```
-For *Token Authentication* prodivder, add necessary settings under
`properties` if needed.
+For *Token Authentication* provider, add necessary settings for `properties`
if needed.
See [Token Authentication](security-jwt.md) for more details.
```
properties:
@@ -180,7 +182,7 @@ superUserRoles:
#### BookKeeper Authentication
-If authentication is enabled on the BookKeeper cluster, you should configure
the BookKeeper authentication settings as follows:
+If authentication is enabled on the BookKeeper cluster, you need configure the
BookKeeper authentication settings as follows:
- `bookkeeperClientAuthenticationPlugin`: the plugin name of BookKeeper client
authentication.
- `bookkeeperClientAuthenticationParametersName`: the plugin parameters name
of BookKeeper client authentication.