Fly-Style commented on code in PR #18860:
URL: https://github.com/apache/druid/pull/18860#discussion_r2639427796
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -596,7 +601,12 @@ private boolean changeTaskCount(int desiredActiveTaskCount)
AUTOSCALER_SCALING_TIME_METRIC,
scaleActionStopwatch.millisElapsed()
));
- log.info("Changed taskCount to [%s] for supervisor[%s] for
dataSource[%s].", desiredActiveTaskCount, supervisorId, dataSource);
+ log.info(
+ "Changed taskCount to [%s] for supervisor[%s] for dataSource[%s].",
+ desiredActiveTaskCount,
+ supervisorId,
+ dataSource
+ );
Review Comment:
https://github.com/apache/druid/pull/18860/commits/d6894c7a962328efa477aeb24686e5a9720b6042
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:
##########
@@ -184,7 +198,7 @@ private CostMetrics collectMetrics()
*
* @return optimal task count for scale-up, or -1 if no scaling action needed
*/
- public int computeOptimalTaskCount(CostMetrics metrics)
+ public int computeOptimalTaskCount(CostMetrics metrics, CostComputeMode
costComputeMode)
Review Comment:
https://github.com/apache/druid/pull/18860/commits/d6894c7a962328efa477aeb24686e5a9720b6042
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:
##########
@@ -204,50 +218,54 @@ public int computeOptimalTaskCount(CostMetrics metrics)
return -1;
}
- // If idle is already in the ideal range [0.2, 0.6], optimal utilization
has been achieved.
- // No scaling is needed - maintain stability by staying at the current
task count.
- final double currentIdleRatio = metrics.getPollIdleRatio();
- if (currentIdleRatio >= 0 &&
WeightedCostFunction.isIdleInIdealRange(currentIdleRatio)) {
- log.debug(
- "Idle ratio [%.3f] is in ideal range for supervisorId [%s], no
scaling needed",
- currentIdleRatio,
- supervisorId
- );
- return -1;
- }
-
int optimalTaskCount = -1;
- double optimalCost = Double.POSITIVE_INFINITY;
+ Tuple3<Double, Double, Double> optimalCost = new
Tuple3<>(Double.POSITIVE_INFINITY,
Review Comment:
https://github.com/apache/druid/pull/18860/commits/d6894c7a962328efa477aeb24686e5a9720b6042
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]