zhangyue19921010 commented on a change in pull request #10524:
URL: https://github.com/apache/druid/pull/10524#discussion_r570002234
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorSpec.java
##########
@@ -151,6 +156,29 @@ public DruidMonitorSchedulerConfig
getMonitorSchedulerConfig()
@Override
public abstract Supervisor createSupervisor();
+ /**
+ * need to notice that autoScaler would be null which means autoscale is
dissable.
+ * @param supervisor
+ * @return autoScaler, disable autoscale will return dummyAutoScaler and
enable autoscale wiil return defaultAutoScaler by default.
+ */
+ @Override
+ @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED", justification =
"using siwtch(String)")
+ public SupervisorTaskAutoscaler createAutoscaler(Supervisor supervisor)
+ {
+ String dataSource = getId();
+ SupervisorTaskAutoscaler autoScaler = new DummyAutoScaler(supervisor,
dataSource);
+ Map<String, Object> dynamicAllocationTasksProperties =
ingestionSchema.getIOConfig().getDynamicAllocationTasksProperties();
+ if (dynamicAllocationTasksProperties != null &&
!dynamicAllocationTasksProperties.isEmpty() &&
Boolean.parseBoolean(String.valueOf(dynamicAllocationTasksProperties.getOrDefault("enableDynamicAllocationTasks",
false)))) {
Review comment:
The reason for designing this condition is that users can disable/enable
autoscaler for a while easily using this config rather than delete all the
autoscaler-related configs.
For examples, advertising business in Super Bowl. Traffic is much higher
during the break time and lower durning Gaming(**Large traffic fluctuations in
the short term**). If users don't set scale-related configs properly, it will
trigger scale action too frequently and creates lots of small segments.
Traffic like this we usually set a larger number of tasks temporarily and
set it false to disable autoscaler for a while.
Also when scale algorithms become more advanced, it is better to remove this
config and let autoscaler to do everything. But for now maybe it would be
better if we keep this parameter :)
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]