@Override protected void serviceStart() throws Exception { hsManager.start(); if (storage instanceof Service) { ((Service) storage).start(); } scheduledExecutor = new ScheduledThreadPoolExecutor(2, new ThreadFactoryBuilder().setNameFormat("Log Scanner/Cleaner #%d") .build()); scheduledExecutor.scheduleAtFixedRate(new MoveIntermediateToDoneRunnable(), moveThreadInterval, moveThreadInterval, TimeUnit.MILLISECONDS); // Start historyCleaner scheduleHistoryCleaner(); super.serviceStart(); }
@Override protected void serviceStart() throws Exception { hsManager.start(); if (storage instanceof Service) { ((Service) storage).start(); } scheduledExecutor = new ScheduledThreadPoolExecutor(2, new ThreadFactoryBuilder().setNameFormat("Log Scanner/Cleaner #%d") .build()); scheduledExecutor.scheduleAtFixedRate(new MoveIntermediateToDoneRunnable(), moveThreadInterval, moveThreadInterval, TimeUnit.MILLISECONDS); // Start historyCleaner scheduleHistoryCleaner(); super.serviceStart(); }
public void refreshJobRetentionSettings() { if (getServiceState() == STATE.STARTED) { conf = createConf(); long maxHistoryAge = conf.getLong(JHAdminConfig.MR_HISTORY_MAX_AGE_MS, JHAdminConfig.DEFAULT_MR_HISTORY_MAX_AGE); hsManager.setMaxHistoryAge(maxHistoryAge); if (futureHistoryCleaner != null) { futureHistoryCleaner.cancel(false); } futureHistoryCleaner = null; scheduleHistoryCleaner(); } else { LOG.warn("Failed to execute refreshJobRetentionSettings : Job History service is not started"); } }
@Override protected void serviceStart() throws Exception { hsManager.start(); if (storage instanceof Service) { ((Service) storage).start(); } scheduledExecutor = new ScheduledThreadPoolExecutor(2, new ThreadFactoryBuilder().setNameFormat("Log Scanner/Cleaner #%d") .build()); scheduledExecutor.scheduleAtFixedRate(new MoveIntermediateToDoneRunnable(), moveThreadInterval, moveThreadInterval, TimeUnit.MILLISECONDS); // Start historyCleaner scheduleHistoryCleaner(); super.serviceStart(); }
public void refreshJobRetentionSettings() { if (getServiceState() == STATE.STARTED) { conf = createConf(); long maxHistoryAge = conf.getLong(JHAdminConfig.MR_HISTORY_MAX_AGE_MS, JHAdminConfig.DEFAULT_MR_HISTORY_MAX_AGE); hsManager.setMaxHistoryAge(maxHistoryAge); if (futureHistoryCleaner != null) { futureHistoryCleaner.cancel(false); } futureHistoryCleaner = null; scheduleHistoryCleaner(); } else { LOG.warn("Failed to execute refreshJobRetentionSettings : Job History service is not started"); } }
public void refreshJobRetentionSettings() { if (getServiceState() == STATE.STARTED) { conf = createConf(); long maxHistoryAge = conf.getLong(JHAdminConfig.MR_HISTORY_MAX_AGE_MS, JHAdminConfig.DEFAULT_MR_HISTORY_MAX_AGE); hsManager.setMaxHistoryAge(maxHistoryAge); if (futureHistoryCleaner != null) { futureHistoryCleaner.cancel(false); } futureHistoryCleaner = null; scheduleHistoryCleaner(); } else { LOG.warn("Failed to execute refreshJobRetentionSettings : Job History service is not started"); } }