1. 30 7月, 2019 1 次提交
    • S
      [schema] KeyValue schema support using AUTO_CONSUME as key/value schema (#4839) · dd7cc890
      Sijie Guo 提交于
      *Motivation*
      
      Currently KeyValue schema doesn't support using AUTO_CONSUME.
      
      This PR is to add this support.
      
      This PR is based on #4836
      
      *Changes*
      
      - refactor a bit on Schema interface to support fetching schema info for both AutoConsumeSchema and KeyValueSchema before subscribing
      - add AUTO_CONSUME support to KeyValueSchema
      - add tests
      dd7cc890
  2. 29 7月, 2019 1 次提交
  3. 22 7月, 2019 1 次提交
    • E
      [Pulsar-Client] Add Producer Builder API Numeric Properties Validations (#4539) · 3c8a44e0
      Eren Avsarogullari 提交于
      * [Pulsar-Client] Add Producer Numeric Properties Validation
      
      * Aligned deprecated and new Producer API validations
      
      * Deprecated and new Producer API validations are being aligned
      
      * batchingMaxMessages C++ API is being aligned with Java API
      
      * batchingMaxMessages Java API Validation is being aligned with C++ API
      
      * Review comments are addressed
      
      * Fix broken UTs
      3c8a44e0
  4. 21 7月, 2019 1 次提交
    • M
      Allow to configure ack-timeout tick time (#4760) · f13af487
      Matteo Merli 提交于
      ### Motivation
      
      After the changes in #3118, there has a been a sharp increase of memory utilization for the UnackedMessageTracker due to the time buckets being created. 
      
      This is especially true when the acktimeout is set to a larger value (eg: 1h) where 3600 time-buckets are being created. This lead to use 20MB per partition even when no message is tracked.
      
      Allowing to configure the tick time so that application can tune it based on needs.
      
      Additionally, fixed the logic that keeps creating hash maps and throwing them away at each tick time iteration, since that creates a lot of garbage and doesn't take care of the fact that the hash maps are expanding based on the required capacity (so next time they are already of the "right" size). 
      
      On a final note: the current default of 1sec seems very wasteful. Something like 10s should be more appropriate as default.
      f13af487
  5. 10 7月, 2019 1 次提交
  6. 03 7月, 2019 1 次提交
  7. 29 6月, 2019 1 次提交
  8. 27 6月, 2019 1 次提交
  9. 26 6月, 2019 1 次提交
  10. 25 6月, 2019 1 次提交
    • S
      [client] Provide a clock for generating publish timestamp for producers (#4562) · 7397b960
      Sijie Guo 提交于
      *Motivation*
      
      Currently producers uses `System.currentTimeMillis()` as publish timestamp by default.
      However at some use cases, producers would like to a different way for generating publish timestamp.
      E.g. in a database use case, a producer might be use HLC (Hybrid Logic Clock) as publish timestamp;
      in integration tests, it might require the producer to use a deterministic way to generate publish timestamp.
      
      *Changes*
      
      This PR introduces a `clock` in building the client. This allows applications to override the system clock
      with its own implementation.
      
      *Verify the change*
      
      Add unit test to test customized clock in both batch and non-batch cases.
      7397b960
  11. 20 6月, 2019 2 次提交
    • S
      [schema] key/value schema enhancement (#4548) · 82d9e716
      Sijie Guo 提交于
      *Motivation*
      
      - The code for encoding and decoding key/value schema is spreading over multiple places.
      - Make code changes to prepare supporting key/value schema in AUTO consumers
      - Make schema tools display key/value schema in a pretty format
      
      *Modifications*
      
      - Move the common logic of encoding and decoding key/value schema to a common class KeyValueSchemaInfo
      - Expose the common class in DefaultImplementation so that it can be available for public usage
      - Fix the display problem on displaying key/value schema
      
      *Verify this change*
      
      - Add bunch of the unit tests for key/value schemas
      82d9e716
    • L
      Introduce batch message container framework and support key based batching container (#4435) · b45736ad
      lipenghui 提交于
      ### Motivation
      
      Introduce batch message container framework to support multiple ways to do message batch. 
      Currently, pulsar support a most basic batch message container, use the batch message container framework can quickly implement other types batch message container, even users can customize their own batch message container.
      
      Add a new batch message container named BatchMessageKeyBasedContainer to support batching message in key_shared subscription mode.
      b45736ad
  12. 18 6月, 2019 2 次提交
  13. 15 6月, 2019 4 次提交
    • E
      Feature - reset cursor on Reader to current position (#4331) · 1c51adc7
      Ezequiel Lovelle 提交于
      * Feature - reset cursor on Reader to current position
      
      *Motivation*
      
      There are some cases in which is it useful to be able to include current
      position of message when reset of cursor was made.
      
      This was reported by a `vvy` on slack, no issue has been created to track this.
      
      *Modifications*
      
        - Add startMessageIdInclusive() to support include current position of
          reset on ReaderBuilder.
        - Add resetIncludeHead field for Reader and Consumer Configuration Data
        - Fix position of cursor for non durable consumer.
        - Improve discard if statement for batch enable mode.
        - Add discard if statement for batch disable mode.
        - Improve test case for latest Reader seek.
        - Add test case to assert the start of specific message id at the expected
          position with data provider scenarios:
            A. Batch enable and start inclusive enable.
            B. Batch enable and start inclusive disable.
            C. Batch disable and start inclusive enable.
            D. Batch disable and start inclusive disable.
      1c51adc7
    • Y
      Make GenericAvroRecord public (#4532) · f90fab28
      Yijie Shen 提交于
      f90fab28
    • H
      f452e6f8
    • L
      Fix NPE of ProducerInterceptors (#4517) · 2285f0d6
      lipenghui 提交于
      * Fix ProducerInterceptors NPE issue.
      
      * Add UT test for ProducerInterceptors while interceptor cause exceptions.
      2285f0d6
  14. 14 6月, 2019 1 次提交
  15. 13 6月, 2019 1 次提交
  16. 12 6月, 2019 1 次提交
  17. 10 6月, 2019 1 次提交
  18. 07 6月, 2019 1 次提交
    • K
      Include pulsar-client-api in shaded client artifacts (#4445) · dfdfdb4e
      Kim Christian Gaarder 提交于
      * o.a.p.c.api -> o.a.p.c.protocol
      
      Classes in pulsar-common module were moved to avoid jpms split-package
      conflict between the pulsar-client-api and pulsar-common modules.
      
      * o.a.p.c.schema -> o.a.p.c.protocol.schema
      
      Classes in pulsar-common module were moved to avoid jpms split-package
      conflict between the pulsar-client-api and pulsar-common modules.
      dfdfdb4e
  19. 06 6月, 2019 2 次提交
    • S
      [Issue 4379] [Java Client] Build auth from class and params in PulsarClientImpl (#4381) · 17d2b421
      Shivji Kumar Jha 提交于
      * Flink client to accept all pulsar client conf
      
      In this patch, we provide handles for flink connecotr to accept ClientConfigurationData, ProducerConfigurationData, ConsumerConfigurationData so flink client can:
      1. accept all params of client, producer and consumer
      2. Keep pace with pulsar-client
      
      * Flink client to accept all pulsar client conf
      
      Added test cases
      
      * Removing commented code
      
      * flink: construct auth when building pulsarsource
      
      * fixed failing tests
      
      * removed unused import
      
      * Added builder defaults for lombok builder
      Set Auth from class and params (if set) in PulsarClientImpl.java
      
      * Remove @BUilder.default from attributes where no defaults exist
      
      * Added tests for ClientConfiguration Data builders
      
      * cosmetic changes in code
      Co-Authored-By: NSijie Guo <guosijie@gmail.com>
      
      * fixing typo
      
      * Removed test, not true anymore
      
      * Removed lombok builders
      
      * fixed the failing tests
      
      * Because the authentication field is transient, it is not serialized. On desirialization then its null and desirialization crashes with NPE
      17d2b421
    • S
      [Issue 4441][client]Deduce ClientConfigurationData.isUseTls from protocol (#4451) · 05ec310d
      Shivji Kumar Jha 提交于
      * Deduce tls from protocol in service url
      
      * fixed failing test
      
      * fixed NPE
      Co-Authored-By: NMatteo Merli <mmerli@apache.org>
      05ec310d
  20. 05 6月, 2019 1 次提交
  21. 04 6月, 2019 2 次提交
  22. 01 6月, 2019 2 次提交
  23. 31 5月, 2019 2 次提交
  24. 30 5月, 2019 2 次提交
    • M
      Initialize TLS context only when attempting connection (#4399) · e3ece349
      Matteo Merli 提交于
      * Initialize TLS context only when attempting connection
      
      * Fixed eviction time check
      e3ece349
    • M
      Delayed message delivery implementation (#4062) · ba24d73b
      Matteo Merli 提交于
      * Delayed message delivery implementation
      
      * Fixed compilation
      
      * Allow to configure the delayed tracker implementation
      
      * Use int64 for timestamp
      
      * Address comments
      
      * More tests for TripleLongPriorityQueue
      
      * Removing useless sync block that causes deadlock with consumer close
      
      * Fixed merge conflict
      
      * Avoid new list when passing entries to consumer
      
      * Fixed test. Since entries are evicted from cache, they might be resent in diff order
      
      * Fixed context message builder
      
      * Fixed triggering writePromise when last entry was nullified
      
      * Moved entries filtering from consumer to dispatcher
      
      * Added Javadocs
      
      * Reduced synchronized scope to minimum
      ba24d73b
  25. 29 5月, 2019 2 次提交
    • M
      Configure static PulsarByteBufAllocator to handle OOM errors (#4196) · 3b33c668
      Matteo Merli 提交于
      * Configure static PulsarByteBufAllocator to handle OOM errors
      
      * Always specify `pulsar.allocator.exit_on_oom` when starting pulsar services
      
      * Reverted metrics back
      
      * Fixed compression tests
      
      * Explicitely set the underlying allocator to netty default
      
      * Fixed shading
      3b33c668
    • L
      resolve a null pointer ex (#4378) · 28c5503d
      Lay 提交于
      * resolve a nullPointer ex
      
      *  renaming sinks and sources api to be consistent with the rest of Pulsar (#4363)
      
      * Rename sources and sinks CLI to be consistent with rest of Pulsar
      
      * renaming sinks and sources api to be consistent with the rest of Pulsar
      
      * use new interfaces in cmd
      
      * Fix install pip (#4387)
      
      ### Motivation
      There is a problem with the current installation of pip when running the integration tests.
      Therefore, install pip using the officially recommended method.
      
      ### Modifications
      
      Modify the pip installation method, refer to https://pip.pypa.io/en/stable/installing/
      28c5503d
  26. 28 5月, 2019 1 次提交
  27. 25 5月, 2019 1 次提交
    • E
      Bugfix - release and recycle on discarded messages (#4342) · 71f39287
      Ezequiel Lovelle 提交于
      Don't leak resources when a message is being discarded.
      
      *Modifications*
      
        - Fix missing release() and recycle() for discarded message on
          receiveIndividualMessagesFromBatch method.
        - Fix argument missing of debug logging {}-placeholder.
        - Fix unnecessary variable reference `payload` on messageReceived().
      71f39287
  28. 23 5月, 2019 1 次提交
    • S
      [schema] AutoConsume should use the schema associated with messages as both... · bf06ef3e
      Sijie Guo 提交于
      [schema] AutoConsume should use the schema associated with messages as both writer and reader schema (#4325)
      
      * [schema] AutoConsume should use the schema associated with messages for both writer and reader schema
      
      *Motivation*
      
      AutoConsume should use the schema associated with the messages for decoding the schemas.
      
      *Modifications*
      
      - provide a flag enable or disable using the provided schema as the reader schema
      - for AUTO_CONSUME schema, disable usnig the provided schema as the reader schema. so it can use the right
        schema version for decoding messages into right generic records
      - provide a few util methods for displaying schema data
      
      * Handle 64 bytes schema version
      
      * Addressed review comments
      bf06ef3e
  29. 21 5月, 2019 1 次提交