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/12/26 12:07:40 UTC

[pulsar-site] branch main updated: Docs sync done from apache/pulsar (#b42aed1)

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 3d43975d558 Docs sync done from apache/pulsar (#b42aed1)
3d43975d558 is described below

commit 3d43975d558b4985b4cdcf0c7947c5dea9446ba7
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Mon Dec 26 12:07:36 2022 +0000

    Docs sync done from apache/pulsar (#b42aed1)
---
 site2/website-next/docs/schema-understand.md       | 22 ++++++++++++++++------
 .../static/swagger/master/swagger.json             |  9 ++++-----
 .../static/swagger/master/v2/swagger.json          |  9 ++++-----
 3 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/site2/website-next/docs/schema-understand.md b/site2/website-next/docs/schema-understand.md
index 239c81aad57..3aa27c0056b 100644
--- a/site2/website-next/docs/schema-understand.md
+++ b/site2/website-next/docs/schema-understand.md
@@ -122,15 +122,25 @@ Pulsar gets the schema definition from the predefined `struct` using an Avro lib
 1. Create the _User_ class to define the messages sent to Pulsar topics.
 
    ```java
+   # If you use Lombok
+
+   @Builder
+   @AllArgsConstructor
+   @NoArgsConstructor
    public static class User {
        public String name;
        public int age;
-       public User(String name, int age) {
- 	this.name = name;
-	this.age = age
-       }
-       public User() {}
    }
+
+   # If you DON'T use Lombok you will need to add the constructor like this
+   # 
+   #   public static class User {
+   #    String name;
+   #    int age;
+   #    public User() { } 
+   #    public User(String name, int age) { this.name = name; this.age = age; } }
+   #}
+
    ```
 
 2. Create a producer with a `struct` schema and send messages.
@@ -363,4 +373,4 @@ The following table outlines the mapping between the schema compatibility check
 |  `ALWAYS_INCOMPATIBLE`  |   N/A  | The schema evolution is disabled.                                                                                                                                                                                                                                                                                   | 
 |  <li>`BACKWARD` </li><li>`BACKWARD_TRANSITIVE` </li> |   Consumer first  | There is no guarantee that consumers using the old schema can read data produced using the new schema. Consequently, **upgrade all consumers first**, and then start producing new data.                                                                                                                            | 
 |  <li>`FORWARD` </li><li>`FORWARD_TRANSITIVE` </li> |   Producer first  | There is no guarantee that consumers using the new schema can read data produced using the old schema. Consequently, **upgrade all producers first** to use the new schema and ensure the data that has already been produced using the old schemas are not available to consumers, and then upgrade the consumers. | 
-|  <li>`FULL` </li><li>`FULL_TRANSITIVE` </li> |   Any order  | It is guaranteed that consumers using the old schema can read data produced using the new schema and consumers using the new schema can read data produced using the old schema. Consequently, you can upgrade the producers and consumers in **any order**.                                                        |
\ No newline at end of file
+|  <li>`FULL` </li><li>`FULL_TRANSITIVE` </li> |   Any order  | It is guaranteed that consumers using the old schema can read data produced using the new schema and consumers using the new schema can read data produced using the old schema. Consequently, you can upgrade the producers and consumers in **any order**.                                                        |
diff --git a/site2/website-next/static/swagger/master/swagger.json b/site2/website-next/static/swagger/master/swagger.json
index 9970ae0402c..27cf3cb4dcc 100644
--- a/site2/website-next/static/swagger/master/swagger.json
+++ b/site2/website-next/static/swagger/master/swagger.json
@@ -28482,9 +28482,6 @@
                 ]
             },
             "put": {
-                "consumes": [
-                    "application/vnd.partitioned-topic-metadata+json"
-                ],
                 "description": "It needs to be called before creating a producer on a partitioned topic.",
                 "operationId": "createPartitionedTopic",
                 "parameters": [
@@ -28510,12 +28507,14 @@
                         "type": "string"
                     },
                     {
-                        "description": "The metadata for the topic",
+                        "description": "The number of partitions for the topic",
                         "in": "body",
                         "name": "body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/PartitionedTopicMetadata"
+                            "default": 0,
+                            "format": "int32",
+                            "type": "integer"
                         }
                     },
                     {
diff --git a/site2/website-next/static/swagger/master/v2/swagger.json b/site2/website-next/static/swagger/master/v2/swagger.json
index 9970ae0402c..27cf3cb4dcc 100644
--- a/site2/website-next/static/swagger/master/v2/swagger.json
+++ b/site2/website-next/static/swagger/master/v2/swagger.json
@@ -28482,9 +28482,6 @@
                 ]
             },
             "put": {
-                "consumes": [
-                    "application/vnd.partitioned-topic-metadata+json"
-                ],
                 "description": "It needs to be called before creating a producer on a partitioned topic.",
                 "operationId": "createPartitionedTopic",
                 "parameters": [
@@ -28510,12 +28507,14 @@
                         "type": "string"
                     },
                     {
-                        "description": "The metadata for the topic",
+                        "description": "The number of partitions for the topic",
                         "in": "body",
                         "name": "body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/PartitionedTopicMetadata"
+                            "default": 0,
+                            "format": "int32",
+                            "type": "integer"
                         }
                     },
                     {