https://github.com/apache/storm/blob/v2.7.1/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Supervisor.java#L325C54-L325C75
is related with Supervisor side healtchecks that can make the
supervisor be shutdown if they fail.
Nor directly related with heartbeats


The configuration is not being used in Storm 2' code (and if confirmed
should be deleted)

    /**
     * How long before a supervisor can go without heartbeating before
nimbus considers it dead and stops assigning new work to it.
     */
    @IsInteger
    @IsPositiveNumber
    public static final String NIMBUS_SUPERVISOR_TIMEOUT_SECS =
"nimbus.supervisor.timeout.secs";



The strategy being used is based on
https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/scheduler/blacklist/BlacklistScheduler.java#L129


/**
 * How often nimbus should wake up to check heartbeats and do
reassignments. Note that if a machine ever goes down Nimbus will
 * immediately wake up and take action. This parameter is for checking
for failures when there's no explicit event like that occurring.
 */
@IsInteger
@IsPositiveNumber
public static final String NIMBUS_MONITOR_FREQ_SECS =
"nimbus.monitor.freq.secs";


toleranceTime =
ObjectReader.getInt(this.conf.get(DaemonConfig.BLACKLIST_SCHEDULER_TOLERANCE_TIME),
                                    DEFAULT_BLACKLIST_SCHEDULER_TOLERANCE_TIME);

nimbusMonitorFreqSecs =
ObjectReader.getInt(this.conf.get(DaemonConfig.NIMBUS_MONITOR_FREQ_SECS));


windowSize = toleranceTime / nimbusMonitorFreqSecs;

So Nimbus tolerance for a Supervisor that stopped sending heartbeats
can be tweaked by using those two properties above: once a supervisor
missed heartbeats for a full windowSize, it's removed from
assignments. Keep in mind that workers have a separate heartbeat flow.

On Thu, 2 Jan 2025 at 10:38, Karthick <ibmkarthickma...@gmail.com> wrote:
>
> Team,
>
> eventTimer.scheduleRecurring(30, 30, new SupervisorHealthCheck(this));
>
> https://github.com/apache/storm/blob/v2.7.1/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Supervisor.java#L325C54-L325C75
>
> These 30 seconds are hard coded, i hope this
> <https://github.com/apache/storm/blob/v2.7.1/storm-server/src/main/java/org/apache/storm/DaemonConfig.java#L252>
> config
> is for this purpose, please clarify.

Reply via email to