1. 04 9月, 2020 1 次提交
    • B
      Various fixes for Batch Source (#7965) · 1632dcaf
      Boyang Jerry Peng 提交于
      * Various fixes for Batch Source
      1. Create intermediate topic/subscription prior to function running in case auto topic creation is turned off
      2. Fix possible NPE in CronTrigger when calling stop()
      3. Stop all producers created in ContextImpl
      4. Delete intermediate topic for batch source
      Co-authored-by: NJerry Peng <jerryp@splunk.com>
      1632dcaf
  2. 21 8月, 2020 1 次提交
  3. 04 8月, 2020 1 次提交
  4. 25 7月, 2020 1 次提交
  5. 02 7月, 2020 1 次提交
    • F
      function to read compacted topics (#7193) · 7a80ca98
      feynmanlin 提交于
      
      Fixes #5538
      
      ### Motivation
      
      
      
      ### Modifications
      In function mode and sink mode, PulsarSource can read compacted topic。
      By `inputSpecs` parameter, each topic can independently decide whether to read compacted
      
      ### Verifying this change
      unit test:
      org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedFunction
      org.apache.pulsar.io.PulsarFunctionE2ETest#testReadCompactedSink
      7a80ca98
  6. 09 6月, 2020 1 次提交
    • F
      [issue #6765] Expose definition flags to function (#6868) · 2aff473e
      feynmanlin 提交于
      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“
      2aff473e
  7. 30 5月, 2020 2 次提交
  8. 22 4月, 2020 1 次提交
  9. 05 4月, 2020 1 次提交
    • R
      Fixed avro schema decode error in functions (#6662) · 52ae1823
      ran 提交于
      Fixes #5503 
      From #6445 
      
      # Motivation
      In functions, it will encounter ```ClassCastException``` when using the Avro schema for topics.
      
      ```
      Exception in thread "main" java.lang.ClassCastException: org.apache.pulsar.shade.org.apache.avro.generic.GenericData$Record cannot be cast to io.streamnative.KeyValueSchemaTest$Foo2
      	at io.streamnative.KeyValueSchemaTest.testConsumerByPythonProduce(KeyValueSchemaTest.java:412)
      	at io.streamnative.KeyValueSchemaTest.main(KeyValueSchemaTest.java:305)
      ```
      
      # Modifications
      In functions, when using Avro schema specific the ClassLoader for ReflectDatumReader.
      
      Add integration test ```testAvroSchemaFunction``` in class ```PulsarFunctionsTest```.
      52ae1823
  10. 06 3月, 2020 1 次提交
    • C
      Independent schema is set for each consumer generated by topic (#6356) · 8003d08e
      congbo 提交于
      ### Motivation
      
      Master Issue: #5454 
      
      When one Consumer subscribe multi topic, setSchemaInfoPorvider() will be covered by the consumer generated by the last topic.
      
      ### Modification
      clone schema for each consumer generated by topic.
      ### Verifying this change
      Add the schemaTest for it.
      8003d08e
  11. 20 12月, 2019 1 次提交
  12. 06 11月, 2019 1 次提交
  13. 04 11月, 2019 1 次提交
  14. 28 10月, 2019 1 次提交
  15. 13 7月, 2019 1 次提交
  16. 10 7月, 2019 1 次提交
  17. 24 5月, 2019 1 次提交
  18. 25 4月, 2019 1 次提交
  19. 02 4月, 2019 1 次提交
  20. 30 3月, 2019 1 次提交
    • S
      [schema] store schema type correctly in schema registry (#3940) · 7e7175db
      Sijie Guo 提交于
      *Motivation*
      
      Fixes #3925
      
      We have 3 places of defining schema type enums. We kept adding
      new schema type in pulsar-common. However we don't update the schema type
      in wire protocol and schema storage.
      
      This causes `SchemaType.NONE` is stored in SchemaRegistry.
      It fails debeizum connector on restarting.
      
      *Modifications*
      
      Make sure all 3 places have consistent schema type definitions.
      Record the correct schema type.
      7e7175db
  21. 19 3月, 2019 1 次提交
    • C
      revise the schema default type not null (#3752) · 1a1c557b
      congbo 提交于
      ### Motivation
      Fix #3741 
      
      ### Modifications
      Support define not not allow null field in schema
      
      ### Verifying this change
      Add not allow null field schema verify
      
      Does this pull request potentially affect one of the following parts:
      If yes was chosen, please highlight the changes
      
      Dependencies (does it add or upgrade a dependency): (no)
      The public API: (no)
      The schema: (yes)
      The default values of configurations: (no)
      The wire protocol: (no)
      The rest endpoints: (no)
      The admin cli options: (no)
      Anything that affects deployment: (no)
      1a1c557b
  22. 09 3月, 2019 2 次提交
    • W
      [pulsar-functions] fix words error and remove not use import java class (#3791) · 4f03548c
      wpl 提交于
      ### Motivation
         when I study and read this module code , I fix some error like:
      1. words error, such as JaveInstance -> JavaInstance, Recieved -> Received,  Unknwon -> Unknown, alterted -> alterted, Updare -> Update, etc.
      2. remove not use import java class.
      3. duplicated code in this  java class I extract method. 
      4. javadoc  styles are consistent (not required)
      
      ### Modifications
      
      minor fix up in pulsar-functions module
      4f03548c
    • S
      NullPointerException at using BytesSchema.of() (#3754) · 85afd6e4
      Sijie Guo 提交于
      Fixes #3734
      
      *Motivation*
      
      Exception occurred when using `BytesSchema.of()`
      
      ```
      Exception in thread "main" java.lang.ExceptionInInitializerError
      	at org.apache.pulsar.examples.simple.ProducerExample.main(ProducerExample.java:32)
      Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      	at org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:36)
      	at org.apache.pulsar.client.internal.DefaultImplementation.newKeyValueSchema(DefaultImplementation.java:158)
      	at org.apache.pulsar.client.api.Schema.<clinit>(Schema.java:123)
      	... 1 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.apache.pulsar.client.internal.DefaultImplementation.lambda$newKeyValueSchema$16(DefaultImplementation.java:160)
      	at org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:34)
      	... 3 more
      Caused by: java.lang.NullPointerException
      	at org.apache.pulsar.client.impl.schema.KeyValueSchema.<init>(KeyValueSchema.java:68)
      	... 9 more
      ```
      
      The problem introduced because the weird class loading and reflection sequence.
      
      When accessing `BytesSchema`, `BytesSchema` will try to initialize `Schema`. When initializing Schema, it will attempts
      to initialize `KV_BYTES` using reflection, and initializing KV_BYTES requires `BytesSchema`. Hence it causes KV_BYTES not being
      initialized correctly.
      
      The change is to avoid this recursive class loading.
      85afd6e4
  23. 18 2月, 2019 1 次提交
  24. 25 1月, 2019 1 次提交
  25. 15 1月, 2019 1 次提交
  26. 08 1月, 2019 1 次提交
  27. 23 12月, 2018 1 次提交
  28. 05 11月, 2018 1 次提交
  29. 24 10月, 2018 1 次提交
  30. 07 10月, 2018 1 次提交
  31. 04 10月, 2018 1 次提交
    • S
      [schema] introduce AUTO_PRODUCE schema (#2685) · 1f373262
      Sijie Guo 提交于
      *Motivation*
      
      Currently trigger function is broken due to the schema enforcement we added recently:
      A producer without schema can't produce messages into a topic with schema.
      
      *Changes*
      
      - Rename `AUTO` to `AUTO_CONSUME`
      - Introduce `AUTO_PRODUCE` schema. The schema produces `byte[]`, but it will validate
        the bytes are compatible with the schema associated with the topic before producing.
      - Change trigger function to use `AUTO_PRODUCE` schema.
      1f373262
  32. 20 9月, 2018 2 次提交
  33. 19 9月, 2018 1 次提交
    • S
      [tests] improve connector related integration tests (#2587) · 7530d64a
      Sijie Guo 提交于
      *Motivation*
      
      with more and more connector are added, it becomes expensive to start all external services at the begin.
      
      *Changes*
      
      - refactor the connector testing framework to start external service before methods
      - fix kafka, cassandra and mysql connectors
      7530d64a
  34. 09 9月, 2018 1 次提交
  35. 07 9月, 2018 1 次提交
  36. 01 9月, 2018 1 次提交
  37. 26 8月, 2018 1 次提交