You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/08/18 15:00:24 UTC

[GitHub] [pulsar] RobertIndie opened a new pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

RobertIndie opened a new pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840


   ### Motivation
   Add auto partitions update interval setting for producer and consumer.
   
   ### Modifications
   
   * add autoUpdatePartitionsInterval to partitioned producer and consumer
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-677981133


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai commented on a change in pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
jiazhai commented on a change in pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#discussion_r473017752



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java
##########
@@ -127,6 +129,11 @@
 
     private boolean batchIndexAckEnabled = false;
 
+    public void setAutoUpdatePartitionsIntervalMin(int interval, TimeUnit timeUnit) {
+        checkArgument(interval >= 0, "interval needs to be >= 0");

Review comment:
       same here, > 0, would be easy to handle. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-677669366


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai commented on a change in pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
jiazhai commented on a change in pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#discussion_r473015096



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -163,4 +165,8 @@ public long batchingPartitionSwitchFrequencyIntervalMicros() {
         return this.batchingPartitionSwitchFrequencyByPublishDelay * batchingMaxPublishDelayMicros;
     }
 
+    public void setAutoUpdatePartitionsIntervalMin(int interval, TimeUnit timeUnit) {
+        checkArgument(interval >= 0, "interval needs to be >= 0");

Review comment:
       interval > 0?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai commented on a change in pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
jiazhai commented on a change in pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#discussion_r473024566



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -95,6 +95,8 @@
 
     private boolean autoUpdatePartitions = true;
 
+    private long autoUpdatePartitionsIntervalMin = 1;

Review comment:
       autoUpdatePartitionsIntervalSeconds maybe better.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai merged pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
jiazhai merged pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-675787881


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-677991746


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-678004324


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-676837833


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on pull request #7840: [Client]Add autoPartitionsUpdateInterval for producer and consumer

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #7840:
URL: https://github.com/apache/pulsar/pull/7840#issuecomment-677384264


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org