afedulov commented on code in PR #950:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/950#discussion_r1981589005


##########
examples/autoscaling/src/main/java/autoscaling/LoadSimulationPipeline.java:
##########
@@ -74,8 +78,38 @@ public static void main(String[] args) throws Exception {
         for (String branch : maxLoadPerTask.split("\n")) {
             String[] taskLoads = branch.split(";");
 
+            /*
+             * Creates an unbounded stream that continuously emits the 
constant value 42L.
+             * Flink's DataGeneratorSource with RateLimiterStrategy is used to 
control the emission rate.
+             *
+             * Rate Calculation:
+             * - samplingIntervalMs / 10 gives maxSleepTimeMs, which 
represents the interval between emissions.

Review Comment:
   I believe this section needs to be adjusted. Since we do not control the 
maxSleepTimeMs directly, but it is rather controlled internally by the Guava's 
token bucket algorithm, it should not be explicitly mentioned here. It is also 
not strictly guaranteed to be max - at the startup there can be a short burst. 
The value 10 seems to just be hardcoded value meaning that we want at least 10 
impulses per sampling interval. Basically it should rather explain: check how 
many sampling intervals are there within a second, make sure that 10 impulses 
are generated for each sampling interval (IMPULSES_PER_SAMPLING_INTERVAL).
   



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

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

Reply via email to