You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/10/06 00:04:02 UTC
[pulsar-site] branch main updated: Docs sync done from apache/pulsar(#1234698)
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new dd91e8dbfb2 Docs sync done from apache/pulsar(#1234698)
dd91e8dbfb2 is described below
commit dd91e8dbfb216e2a267cad1fd500c2d9990e00df
Author: Pulsar Site Updater <de...@pulsar.apache.org>
AuthorDate: Thu Oct 6 00:03:57 2022 +0000
Docs sync done from apache/pulsar(#1234698)
---
site2/website-next/docs/client-libraries-cpp.md | 7 +++----
site2/website-next/docs/client-libraries.md | 16 ++++++++--------
site2/website-next/docs/functions-develop-serde.md | 16 ++++++++--------
3 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/site2/website-next/docs/client-libraries-cpp.md b/site2/website-next/docs/client-libraries-cpp.md
index 027644b007d..58d1cef4b3c 100644
--- a/site2/website-next/docs/client-libraries-cpp.md
+++ b/site2/website-next/docs/client-libraries-cpp.md
@@ -108,7 +108,7 @@ If you get an error like "libpulsar.so: cannot open shared object file: No such
### Source
-For how to build Pulsar C++ client on different platforms from source code, see [compliation](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).
+For how to build Pulsar C++ client on different platforms from source code, see [compliation](https://github.com/apache/pulsar-client-cpp#compilation).
## Connection URLs
@@ -408,12 +408,11 @@ config.setAuth(pulsar::AuthTls::create(
Client client("pulsar+ssl://my-broker.com:6651", config);
```
-For complete examples, refer to [C++ client examples](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp/examples).
+For complete examples, refer to [C++ client examples](https://github.com/apache/pulsar-client-cpp/tree/main/examples).
## Schema
-This section describes some examples about schema. For more information about
-schema, see [Pulsar schema](schema-get-started.md).
+This section describes some examples about schema. For more information about schema, see [Pulsar schema](schema-get-started.md).
### Avro schema
diff --git a/site2/website-next/docs/client-libraries.md b/site2/website-next/docs/client-libraries.md
index d5842bdd0c1..f76de91ed7a 100644
--- a/site2/website-next/docs/client-libraries.md
+++ b/site2/website-next/docs/client-libraries.md
@@ -6,14 +6,14 @@ sidebar_label: "Overview"
Pulsar supports the following language-specific client libraries:
-| Language | Documentation | Release note | Code repo |
-| --------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
-| Java | [User doc](client-libraries-java.md) <br/> [API doc](/api/client/) | [Bundled](/release-notes/) | [Bundled](https://github.com/apache/pulsar/tree/master/pulsar-client) |
-| C++ | [User doc](client-libraries-cpp.md) <br/> [API doc](/api/cpp/) | [Bundled](/release-notes/) | [Bundled](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp) |
-| Python | [User doc](client-libraries-python.md) <br/> [API doc](/api/python/) | [Bundled](/release-notes/) | [Bundled](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp/python) |
-| Go client | [User doc](client-libraries-go.md) | [Standalone](https://github.com/apache/pulsar-client-go/releases) | [Standalone](https://github.com/apache/pulsar-client-go) |
-| Node.js | [User doc](client-libraries-node.md) | [Standalone](https://github.com/apache/pulsar-client-node/releases) | [Standalone](https://github.com/apache/pulsar-client-node) |
-| C# | [User doc](client-libraries-dotnet.md) | [Standalone](https://github.com/apache/pulsar-dotpulsar/blob/master/CHANGELOG.md) | [Standalone](https://github.com/apache/pulsar-dotpulsar) |
+| Language | Documentation | Release note | Code repo |
+| --------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| Java | [User doc](client-libraries-java.md) <br/> [API doc](/api/client/) | [Bundled](/release-notes/) | [Bundled](https://github.com/apache/pulsar/tree/master/pulsar-client) |
+| C++ | [User doc](client-libraries-cpp.md) <br/> [API doc](/api/cpp/) | [Bundled](/release-notes/) | [Standalone](https://github.com/apache/pulsar/pulsar-client-cpp) |
+| Python | [User doc](client-libraries-python.md) <br/> [API doc](/api/python/) | [Bundled](/release-notes/) | [Standalone](https://github.com/apache/pulsar-client-python) |
+| Go client | [User doc](client-libraries-go.md) | [Standalone](https://github.com/apache/pulsar-client-go/releases) | [Standalone](https://github.com/apache/pulsar-client-go) |
+| Node.js | [User doc](client-libraries-node.md) | [Standalone](https://github.com/apache/pulsar-client-node/releases) | [Standalone](https://github.com/apache/pulsar-client-node) |
+| C# | [User doc](client-libraries-dotnet.md) | [Standalone](https://github.com/apache/pulsar-dotpulsar/blob/master/CHANGELOG.md) | [Standalone](https://github.com/apache/pulsar-dotpulsar) |
Pulsar supports the following language-agnostic client libraries:
diff --git a/site2/website-next/docs/functions-develop-serde.md b/site2/website-next/docs/functions-develop-serde.md
index 2bd7c32d4fc..203177170ba 100644
--- a/site2/website-next/docs/functions-develop-serde.md
+++ b/site2/website-next/docs/functions-develop-serde.md
@@ -24,7 +24,7 @@ SerDe works in the following ways for Java functions.
- If the input or output topics do not exist, Pulsar Functions adopt the following rules to determine SerDe:
- If the schema type is specified, Pulsar Functions use the specified schema type.
- If SerDe is specified, Pulsar Functions use the specified SerDe, and the schema type for input and output topics is `byte`.
- - If neither the schema type nor SerDe is specified, Pulsar Functions use the built-in SerDe. For non-primitive schema types, the built-in SerDe serializes and deserializes objects in the `JSON` format.
+ - If neither the schema type nor SerDe is specified, Pulsar Functions use the built-in SerDe. For non-primitive schema types, the built-in SerDe serializes and deserializes objects in the `JSON` format.
For example, imagine that you're writing a function that processes tweet objects. You can refer to the following example of the `Tweet` class in Java.
@@ -87,7 +87,7 @@ Custom SerDe classes must be packaged with your function JARs.
In Python, the default SerDe is an identity, meaning that the type is serialized as whatever type the function returns.
-For example, you can specify the SerDe as follows when deploying a function in [cluster mode](functions-deploy-cluster.md).
+For example, you can specify the SerDe as follows when deploying a function in [cluster mode](functions-deploy-cluster.md).
```bash
bin/pulsar-admin functions create \
@@ -101,7 +101,7 @@ bin/pulsar-admin functions create \
--output output-topic-1
```
-This case contains two input topics: `input-topic-1` and `input-topic-2`, each of which is mapped to a different SerDe class (the mapping must be specified as a JSON string). The output topic `output-topic-1` uses the `Serde3` class for SerDe.
+This case contains two input topics: `input-topic-1` and `input-topic-2`, each of which is mapped to a different SerDe class (the mapping must be specified as a JSON string). The output topic `output-topic-1` uses the `Serde3` class for SerDe.
:::note
@@ -111,11 +111,11 @@ All function-related logic, including processing and SerDe classes, must be cont
The table outlines three SerDe options for Python functions.
-| SerDe option | Description | Use case|
-| ------------|-----------|-----------|
-| `IdentitySerde` (default) | Use the [`IdentitySerde`](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/functions/serde.py#L70), which leaves the data unchanged. Creating or running a function without explicitly specifying SerDe means that this option is used. | When you work with simple types like strings, booleans, integers.|
-| `PickleSerDe` | Use the [`PickleSerDe`](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/functions/serde.py#L62), which uses Python [`pickle`](https://docs.python.org/3/library/pickle.html) for SerDe. | When you work with complex, application-specific types and are comfortable with the "best-effort" approach of `pickle`.|
-| `Custom SerDe` | Create a custom SerDe class by implementing the baseline [`SerDe`](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/functions/serde.py#L50) class, which has just two methods:<br />* [`serialize`](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/functions/serde.py#L53) for converting the object into bytes.<br />* [`deserialize`](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/functions/ [...]
+| SerDe option | Description | Use case|
+| ------------|-----------|-----------|
+| `IdentitySerde` (default) | Use the `IdentitySerde`, which leaves the data unchanged. Creating or running a function without explicitly specifying SerDe means that this option is used. | When you work with simple types like strings, booleans, integers.|
+| `PickleSerDe` | Use the `PickleSerDe`, which uses Python [`pickle`](https://docs.python.org/3/library/pickle.html) for SerDe. | When you work with complex, application-specific types and are comfortable with the "best-effort" approach of `pickle`.|
+| `Custom SerDe` | Create a custom SerDe class by implementing the baseline `SerDe` class, which has just two methods:<br />* `serialize` for converting the object into bytes.<br />* `deserialize` for converting bytes into an object of the required application-specific type. | When you require explicit control over SerDe, potentially for performance or data compatibility purposes.|
For example, imagine that you are writing a function that processes tweet objects. You can refer to the following example of the `Tweet` class in Python.