private boolean checkIfLeaderAlive() {
    String currJMV = currentJMVersion.get();
    String blobJMV = blob.getJobModelVersion();
    //Get the leader processor row from the table.
    ProcessorEntity leader = getLeader(currJMV);
    int currJMVInt = currJMV.equals(initialState) ? 0 : Integer.valueOf(currJMV);
    ProcessorEntity nextLeader = Integer.valueOf(blobJMV) > currJMVInt ? getLeader(blobJMV) : null;
    // Check if row hasn't been updated since 30 seconds.
    boolean leaderIsAlive = leader != null && (System.currentTimeMillis() - leader.getTimestamp().getTime() < (LIVENESS_DEBOUNCE_TIME_SEC * 1000));
    return leaderIsAlive || nextLeader != null;
  }
Scheduler class invoked by each processor to check if the leader is alive.
Checks every 30 seconds.
If a processor row hasn't been updated since 30 seconds, the system assumes that the processor has died.
All time units are in SECONDS.
samza-azure/src/main/java/org/apache/samza/coordinator/scheduler/LeaderLivenessCheckScheduler.java