srkukarni closed pull request #2422: Improve the documentation about publish 
function
URL: https://github.com/apache/incubator-pulsar/pull/2422
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
 
b/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
index fba82a7579..2856b7cab0 100644
--- 
a/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
+++ 
b/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
@@ -166,11 +166,11 @@
      *            The name of the topic for publishing
      * @param object
      *            The object that needs to be published
-     * @param topicsPattern
+     * @param schemaOrSerdeClassName
      *            Either a builtin schema type (eg: "avro", "json", 
"protobuf") or the class name of the custom schema class
      * @return A future that completes when the framework is done publishing 
the message
      */
-    <O> CompletableFuture<Void> publish(String topicName, O object, String 
schemaType);
+    <O> CompletableFuture<Void> publish(String topicName, O object, String 
schemaOrSerdeClassName);
 
     /**
      * Publish an object to the topic using default schemas
diff --git 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
index 18e1fe3514..7265e456cc 100644
--- 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
+++ 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
@@ -259,8 +259,8 @@ public ByteBuffer getState(String key) {
 
     @SuppressWarnings("unchecked")
     @Override
-    public <O> CompletableFuture<Void> publish(String topicName, O object, 
String serDeClassName) {
-        return publish(topicName, object, (Schema<O>) 
topicSchema.getSchema(topicName, object, serDeClassName));
+    public <O> CompletableFuture<Void> publish(String topicName, O object, 
String schemaOrSerdeClassName) {
+        return publish(topicName, object, (Schema<O>) 
topicSchema.getSchema(topicName, object, schemaOrSerdeClassName));
     }
 
     @SuppressWarnings("unchecked")


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to