public YarnApplicationStatusMonitor( YarnClient yarnClient, ApplicationId yarnApplicationId, ScheduledExecutor scheduledExecutor) { this.yarnClient = Preconditions.checkNotNull(yarnClient); this.yarnApplicationId = Preconditions.checkNotNull(yarnApplicationId); applicationStatusUpdateFuture = scheduledExecutor.scheduleWithFixedDelay( this::updateApplicationStatus, 0L, UPDATE_INTERVAL, TimeUnit.MILLISECONDS); applicationStatus = ApplicationStatus.UNKNOWN; }
this.executionGraphCleanupTask = scheduledExecutor.scheduleWithFixedDelay( executionGraphCache::cleanup, cleanupInterval,
public YarnApplicationStatusMonitor( YarnClient yarnClient, ApplicationId yarnApplicationId, ScheduledExecutor scheduledExecutor) { this.yarnClient = Preconditions.checkNotNull(yarnClient); this.yarnApplicationId = Preconditions.checkNotNull(yarnApplicationId); applicationStatusUpdateFuture = scheduledExecutor.scheduleWithFixedDelay( this::updateApplicationStatus, 0L, UPDATE_INTERVAL, TimeUnit.MILLISECONDS); applicationStatus = ApplicationStatus.UNKNOWN; }
public YarnApplicationStatusMonitor( YarnClient yarnClient, ApplicationId yarnApplicationId, ScheduledExecutor scheduledExecutor) { this.yarnClient = Preconditions.checkNotNull(yarnClient); this.yarnApplicationId = Preconditions.checkNotNull(yarnApplicationId); applicationStatusUpdateFuture = scheduledExecutor.scheduleWithFixedDelay( this::updateApplicationStatus, 0L, UPDATE_INTERVAL, TimeUnit.MILLISECONDS); applicationStatus = ApplicationStatus.UNKNOWN; }
/** * Starts the slot manager with the given leader id and resource manager actions. * * @param newResourceManagerId to use for communication with the task managers * @param newMainThreadExecutor to use to run code in the ResourceManager's main thread * @param newResourceActions to use for resource (de-)allocations */ public void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.info("Starting the SlotManager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor); resourceActions = Preconditions.checkNotNull(newResourceActions); started = true; taskManagerTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkTaskManagerTimeouts()), 0L, taskManagerTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); slotRequestTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkSlotRequestTimeouts()), 0L, slotRequestTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); }
taskManagerTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay(new Runnable() { @Override public void run() { slotRequestTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay(new Runnable() { @Override public void run() {
/** * Starts the slot manager with the given leader id and resource manager actions. * * @param newResourceManagerId to use for communication with the task managers * @param newMainThreadExecutor to use to run code in the ResourceManager's main thread * @param newResourceActions to use for resource (de-)allocations */ public void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.info("Starting the SlotManager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor); resourceActions = Preconditions.checkNotNull(newResourceActions); started = true; taskManagerTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkTaskManagerTimeouts()), taskManagerCheckerInitialDelay.toMilliseconds(), taskManagerTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); slotRequestTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkSlotRequestTimeouts()), 0L, slotRequestTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); }
/** * Starts the slot manager with the given leader id and resource manager actions. * * @param newResourceManagerId to use for communication with the task managers * @param newMainThreadExecutor to use to run code in the ResourceManager's main thread * @param newResourceActions to use for resource (de-)allocations */ public void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.info("Starting the SlotManager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor); resourceActions = Preconditions.checkNotNull(newResourceActions); started = true; taskManagerTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkTaskManagerTimeouts()), 0L, taskManagerTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); slotRequestTimeoutCheck = scheduledExecutor.scheduleWithFixedDelay( () -> mainThreadExecutor.execute( () -> checkSlotRequestTimeouts()), 0L, slotRequestTimeout.toMilliseconds(), TimeUnit.MILLISECONDS); }
}}); this.cleanupFuture = scheduledExecutor.scheduleWithFixedDelay( jobDetailsCache::cleanUp, expirationTime.toMilliseconds(),
}}); this.cleanupFuture = scheduledExecutor.scheduleWithFixedDelay( jobDetailsCache::cleanUp, expirationTime.toMilliseconds(),
}}); this.cleanupFuture = scheduledExecutor.scheduleWithFixedDelay( jobDetailsCache::cleanUp, expirationTime.toMilliseconds(),
this.executionGraphCleanupTask = scheduledExecutor.scheduleWithFixedDelay( executionGraphCache::cleanup, cleanupInterval,
this.executionGraphCleanupTask = scheduledExecutor.scheduleWithFixedDelay( executionGraphCache::cleanup, cleanupInterval,