function apply protobuf input.
See original GitHub issueHello. I’m testing pulsar function for easy ETL job recently, but i encountered some errors that i couldn’t figure it out. there is my snippet.
and producer is:
Expected behavior
I assumed that localrunner could established a function process the deserialized messages with schema from schema registry, then produce to target topic.
Actual behavior
[ERROR] 2019-07-17 11:19:20.175 [public/default/Addressbook-0] JavaInstanceRunnable - [public/default/Addressbook:0] Uncaught exception in Java Instance
java.lang.UnsupportedOperationException: null
at java.util.AbstractMap.put(AbstractMap.java:209) ~[?:1.8.0_201]
at org.apache.pulsar.client.impl.schema.SchemaDefinitionBuilderImpl.build(SchemaDefinitionBuilderImpl.java:101) ~[pulsar-client-2.4.0.jar:2.4.0]
at org.apache.pulsar.client.impl.schema.ProtobufSchema.ofGenericClass(ProtobufSchema.java:106) ~[pulsar-client-2.4.0.jar:2.4.0]
at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:149) ~[pulsar-functions-local-runner-2.4.0.jar:2.4.0]
at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:173) ~[pulsar-functions-local-runner-2.4.0.jar:2.4.0]
at org.apache.pulsar.functions.source.TopicSchema.lambda$getSchema$0(TopicSchema.java:66) ~[pulsar-functions-local-runner-2.4.0.jar:2.4.0]
at java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0_201]
Could anyone telling what to do, cause I could not find any document or example showing how it work.
System configuration
Pulsar version: 2.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Overview | Protocol Buffers - Google Developers
The code generated by protocol buffers provides utility methods to retrieve data from files and streams, extract individual values from the ...
Read more >How to use Protobuf for data interchange - Opensource.com
The IDL document, in both DCE/RPC and Protobuf, is the input to utilities that create the infrastructure code for exchanging data:
Read more >Tutorial: Protocol Buffer Basics
Protocol buffers solve the problem of efficiently serializing and deserializing structured data in a language-agnostic manner, accessible to a vast array of ...
Read more >How to setup your Android app to use Protobuf - ProAndroidDev
Next step is creating a Java module and applying the protobuf plugin to build.gradle file by adding this line on top:
Read more >Serialiazing your data with Protobuf - Conan Blog
Protocol Buffers is an open source project under the BSD 3-Clause license, a popular one developed by Google, to provide a language-neutral, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@YangZunYu I think there is a bug. Its a simple fix. It involves this line of code:
https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/TopicSchema.java#L149
Can’t use Collections.emptyMap() because it doesn’t allow anything to be added to it later.
This has been fixed in the latest master.