[GitHub] [samza] weisong44 commented on a change in pull request #961: SAMZA-2134:Enable table rate limiter by default.

2019-03-26 Thread GitBox
weisong44 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_r269080557
 
 

 ##
 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 withDisableRateLimiter() {
+withDisableReadRateLimiter();
+withDisableWriteRateLimiter();
+return this;
+  }
+
+  /**
+   * Disable the read rate limiter.
+   *
+   * @return this table descriptor instance.
+   */
+  public RemoteTableDescriptor withDisableReadRateLimiter() {
 
 Review comment:
   can we call this withReadRateLimiterDisabled() ?


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


[GitHub] [samza] weisong44 commented on a change in pull request #961: SAMZA-2134:Enable table rate limiter by default.

2019-03-26 Thread GitBox
weisong44 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_r269080884
 
 

 ##
 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 withDisableRateLimiter() {
+withDisableReadRateLimiter();
+withDisableWriteRateLimiter();
+return this;
+  }
+
+  /**
+   * Disable the read rate limiter.
+   *
+   * @return this table descriptor instance.
+   */
+  public RemoteTableDescriptor withDisableReadRateLimiter() {
+this.enableReadRateLimiter = false;
+return this;
+  }
+
+  /**
+   * Disable the write rate limiter.
+   *
+   * @return this table descriptor instance.
+   */
+  public RemoteTableDescriptor withDisableWriteRateLimiter() {
 
 Review comment:
   Can we call this withWriteRateLimiterDisabled() ?


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