This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.11 by this push:
     new 6b8ff3f1ab7 [improve][doc] Improve Pulsar function document (#20073)
6b8ff3f1ab7 is described below

commit 6b8ff3f1ab7be8e83f7293496d672a19bc76d13f
Author: Jiwei Guo <[email protected]>
AuthorDate: Wed Apr 12 15:39:31 2023 +0800

    [improve][doc] Improve Pulsar function document (#20073)
---
 distribution/server/src/assemble/bin.xml                          | 5 +++++
 .../java-examples/src/main/resources/example-function-config.yaml | 3 ---
 .../src/main/resources/example-stateful-function-config.yaml      | 8 +++-----
 .../src/main/resources/example-window-function-config.yaml        | 3 ---
 4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/distribution/server/src/assemble/bin.xml 
b/distribution/server/src/assemble/bin.xml
index 12c443dc6c5..92aef62f9f6 100644
--- a/distribution/server/src/assemble/bin.xml
+++ b/distribution/server/src/assemble/bin.xml
@@ -116,6 +116,11 @@
       <destName>example-window-function-config.yaml</destName>
       <outputDirectory>examples</outputDirectory>
     </file>
+    <file>
+      
<source>${basedir}/../../pulsar-functions/java-examples/src/main/resources/example-stateful-function-config.yaml</source>
+      <destName>example-stateful-function-config.yaml</destName>
+      <outputDirectory>examples</outputDirectory>
+    </file>
   </files>
   <dependencySets>
     <dependencySet>
diff --git 
a/pulsar-functions/java-examples/src/main/resources/example-function-config.yaml
 
b/pulsar-functions/java-examples/src/main/resources/example-function-config.yaml
index a66b75fb233..1f185a2e741 100644
--- 
a/pulsar-functions/java-examples/src/main/resources/example-function-config.yaml
+++ 
b/pulsar-functions/java-examples/src/main/resources/example-function-config.yaml
@@ -22,9 +22,6 @@ namespace: "test-namespace"
 name: "example"
 className: "org.apache.pulsar.functions.api.examples.ExclamationFunction"
 inputs: ["test_src"]
-userConfig:
-  "PublishTopic": "test_result"
-
 output: "test_result"
 autoAck: true
 parallelism: 1
diff --git 
a/pulsar-functions/java-examples/src/main/resources/example-stateful-function-config.yaml
 
b/pulsar-functions/java-examples/src/main/resources/example-stateful-function-config.yaml
index 605b6b0dcb5..5a6827ac06f 100644
--- 
a/pulsar-functions/java-examples/src/main/resources/example-stateful-function-config.yaml
+++ 
b/pulsar-functions/java-examples/src/main/resources/example-stateful-function-config.yaml
@@ -19,12 +19,10 @@
 
 tenant: "test"
 namespace: "test-namespace"
-name: "stateful-example"
+name: "word_count"
 className: "org.apache.pulsar.functions.api.examples.WordCountFunction"
 inputs: ["test_stateful_src"]
-userConfig:
-  "PublishTopic": "test_stateful_result"
-
-output: "test_stateful_result"
+inputs: ["test_wordcount_src"]
+output: "test_wordcount_result"
 autoAck: true
 parallelism: 1
diff --git 
a/pulsar-functions/java-examples/src/main/resources/example-window-function-config.yaml
 
b/pulsar-functions/java-examples/src/main/resources/example-window-function-config.yaml
index e0faf6f62f7..3edba315e96 100644
--- 
a/pulsar-functions/java-examples/src/main/resources/example-window-function-config.yaml
+++ 
b/pulsar-functions/java-examples/src/main/resources/example-window-function-config.yaml
@@ -22,9 +22,6 @@ namespace: "test-namespace"
 name: "example"
 className: "org.apache.pulsar.functions.api.examples.AddWindowFunction"
 inputs: ["test_src"]
-userConfig:
-  "PublishTopic": "test_result"
-
 output: "test_result"
 autoAck: true
 parallelism: 1

Reply via email to