dengpanyin commented on a change in pull request #961: SAMZA-2134:Enable table 
rate limiter by default.
URL: https://github.com/apache/samza/pull/961#discussion_r268856771
 
 

 ##########
 File path: 
samza-api/src/main/java/org/apache/samza/table/descriptors/RemoteTableDescriptor.java
 ##########
 @@ -173,6 +179,41 @@ public RemoteTableDescriptor(String tableId) {
     return this;
   }
 
+  /**
+   * Disable both read and write rate limiter. If the read rate limiter is 
enabled, the user must provide a rate limiter
+   * by calling {@link #withRateLimiter(RateLimiter, 
TableRateLimiter.CreditFunction, TableRateLimiter.CreditFunction)}
+   * or {@link #withReadRateLimit(int)}. If the write rate limiter is enabled, 
the user must provide a rate limiter
+   * by calling {@link #withRateLimiter(RateLimiter, 
TableRateLimiter.CreditFunction, TableRateLimiter.CreditFunction)}
+   * or {@link #withWriteRateLimit(int)}. By default, both read and write rate 
limiters are enabled.
+   *
+   * @return this table descriptor instance.
+   */
+  public RemoteTableDescriptor<K, V> withDisableRateLimiter() {
 
 Review comment:
   @vjagadish1989 
   Having a rate limier for a remote read/write table is highly recommended, 
and we will enable the rate limiter by default so that the user can either 
explicitly set a rate limiter or disable it. There is no change if the user is 
currently using rate limiter. Otherwise, the user either needs to set one or 
disable it using this API based on their use case. 
   Ideally we should set a default one, but we can't get a correct estimation, 
and could result in problems, so we push the user to make the decision. 
   
   This rate limiter is still an optional field. For optional field we don't 
put in the constructors. 
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to