dengpanyin commented on a change in pull request #982: SAMZA-2153: Implement to
Config for TableRetryPolicy
URL: https://github.com/apache/samza/pull/982#discussion_r277497627
##########
File path:
samza-api/src/main/java/org/apache/samza/table/descriptors/RemoteTableDescriptor.java
##########
@@ -164,12 +172,17 @@ public RemoteTableDescriptor(String tableId) {
* @return this table descriptor instance
*/
public RemoteTableDescriptor<K, V> withRateLimiter(RateLimiter rateLimiter,
- TableRateLimiter.CreditFunction<K, V> readCreditFn,
- TableRateLimiter.CreditFunction<K, V> writeCreditFn) {
+ TableRateLimiter.CreditFunction<K, V> readCreditFn,
TableRateLimiter.CreditFunction<K, V> writeCreditFn) {
Preconditions.checkNotNull(rateLimiter, "null read rate limiter");
this.rateLimiter = rateLimiter;
this.readCreditFn = readCreditFn;
this.writeCreditFn = writeCreditFn;
+ if (this.readCreditFn != null) {
+ this.readCreditFn.setTableId(String.format("%s.%s", tableId,
READ_CREDIT_FN));
Review comment:
remove this.
The formatted strings are the same, you can write a method to do the
formatting.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services