-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avro Schema Definition flags are not exposed on Pulsar Functions #6765
Comments
codelipenghui
pushed a commit
that referenced
this issue
Jun 9, 2020
1) Change the value of the CLI tool parameter "--custom-schema-input" from "TopicName-> schemaType" to "topicName-> {" schemaType ":" type"," jsr310ConversionEnabled ": true," alwaysAllowNull ": true}" 2) Modify Function.proto, add properties "jsr310ConversionEnabled", "alwaysAllowNull"。So that we can receive the above 2 parameters 3) Modify the "FunctionConfigUtils#convert" method , put the two parameters in "CustomSchemaInputs" into ConsumerSpec 4) In “JavaInstanceRunnable#setupInput” method, put the above 2 parameters into "ConsumerConfig" and pass it to "PulsarSource", let it set the parameters into "schema" when creating the consumer of Source。 So that,The “function” can get these 2 parameters from the message of ”currentRecord“
cdbartholomew
pushed a commit
to kafkaesque-io/pulsar
that referenced
this issue
Jul 24, 2020
1) Change the value of the CLI tool parameter "--custom-schema-input" from "TopicName-> schemaType" to "topicName-> {" schemaType ":" type"," jsr310ConversionEnabled ": true," alwaysAllowNull ": true}" 2) Modify Function.proto, add properties "jsr310ConversionEnabled", "alwaysAllowNull"。So that we can receive the above 2 parameters 3) Modify the "FunctionConfigUtils#convert" method , put the two parameters in "CustomSchemaInputs" into ConsumerSpec 4) In “JavaInstanceRunnable#setupInput” method, put the above 2 parameters into "ConsumerConfig" and pass it to "PulsarSource", let it set the parameters into "schema" when creating the consumer of Source。 So that,The “function” can get these 2 parameters from the message of ”currentRecord“
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this issue
Aug 24, 2020
1) Change the value of the CLI tool parameter "--custom-schema-input" from "TopicName-> schemaType" to "topicName-> {" schemaType ":" type"," jsr310ConversionEnabled ": true," alwaysAllowNull ": true}" 2) Modify Function.proto, add properties "jsr310ConversionEnabled", "alwaysAllowNull"。So that we can receive the above 2 parameters 3) Modify the "FunctionConfigUtils#convert" method , put the two parameters in "CustomSchemaInputs" into ConsumerSpec 4) In “JavaInstanceRunnable#setupInput” method, put the above 2 parameters into "ConsumerConfig" and pass it to "PulsarSource", let it set the parameters into "schema" when creating the consumer of Source。 So that,The “function” can get these 2 parameters from the message of ”currentRecord“
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A few stories have been added that allow Avro Schema Compatibility on Pulsar to conform with the default Avro behaviour, namely:
boolean isJsr310ConversionEnabled
boolean getAlwaysAllowNull
Unfortunately these flags are not exposed into Pulsar Function configuration, therefore we cannot AUTO_CONSUME or AUTO_PRODUCE to topics with stricter Avro Schema Validation
Expected behavior
The text was updated successfully, but these errors were encountered: