dengpanyin commented on a change in pull request #1168: Fix java doc of table
descriptor for default rate limiter
URL: https://github.com/apache/samza/pull/1168#discussion_r327854454
##########
File path:
samza-core/src/main/java/org/apache/samza/util/EmbeddedTaggedRateLimiter.java
##########
@@ -115,6 +115,8 @@ public void init(Context context) {
int numTasks = jobModel.getContainers().values().stream()
.mapToInt(cm -> cm.getTasks().size())
.sum();
+ Preconditions.checkArgument(e.getValue() >= numTasks,
Review comment:
Shall we just warn the user instead of throw exception for this case?
Also change line 120 to be:
double effectiveRate = (double) e.getValue() / numTasks;
----------------------------------------------------------------
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