private TrackingCorruptIndexHandler createCorruptIndexHandler(Configuration config) { long failingIndexTimeoutSeconds = config.failingIndexTimeoutSeconds(); long errorWarnIntervalSeconds = config.errorWarnIntervalSeconds(); TrackingCorruptIndexHandler corruptIndexHandler = new TrackingCorruptIndexHandler(); corruptIndexHandler.setCorruptInterval(failingIndexTimeoutSeconds, TimeUnit.SECONDS); corruptIndexHandler.setErrorWarnInterval(errorWarnIntervalSeconds, TimeUnit.SECONDS); if (failingIndexTimeoutSeconds <= 0){ log.info("[failingIndexTimeoutSeconds] is set to {}. Auto corrupt index isolation handling is disabled, warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } else { log.info("Auto corrupt index isolation handling is enabled. Any async index which fails for {}s would " + "be marked as corrupted and would be skipped from further indexing. A warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } return corruptIndexHandler; }
private TrackingCorruptIndexHandler createCorruptIndexHandler(Configuration config) { long failingIndexTimeoutSeconds = config.failingIndexTimeoutSeconds(); long errorWarnIntervalSeconds = config.errorWarnIntervalSeconds(); TrackingCorruptIndexHandler corruptIndexHandler = new TrackingCorruptIndexHandler(); corruptIndexHandler.setCorruptInterval(failingIndexTimeoutSeconds, TimeUnit.SECONDS); corruptIndexHandler.setErrorWarnInterval(errorWarnIntervalSeconds, TimeUnit.SECONDS); corruptIndexHandler.setMeterStats(statisticsProvider.getMeter(TrackingCorruptIndexHandler.CORRUPT_INDEX_METER_NAME, StatsOptions.METRICS_ONLY)); if (failingIndexTimeoutSeconds <= 0){ log.info("[failingIndexTimeoutSeconds] is set to {}. Auto corrupt index isolation handling is disabled, warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } else { log.info("Auto corrupt index isolation handling is enabled. Any async index which fails for {}s would " + "be marked as corrupted and would be skipped from further indexing. A warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } return corruptIndexHandler; }
private TrackingCorruptIndexHandler createCorruptIndexHandler(Configuration config) { long failingIndexTimeoutSeconds = config.failingIndexTimeoutSeconds(); long errorWarnIntervalSeconds = config.errorWarnIntervalSeconds(); TrackingCorruptIndexHandler corruptIndexHandler = new TrackingCorruptIndexHandler(); corruptIndexHandler.setCorruptInterval(failingIndexTimeoutSeconds, TimeUnit.SECONDS); corruptIndexHandler.setErrorWarnInterval(errorWarnIntervalSeconds, TimeUnit.SECONDS); corruptIndexHandler.setMeterStats(statisticsProvider.getMeter("corrupt-index", StatsOptions.METRICS_ONLY)); if (failingIndexTimeoutSeconds <= 0){ log.info("[failingIndexTimeoutSeconds] is set to {}. Auto corrupt index isolation handling is disabled, warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } else { log.info("Auto corrupt index isolation handling is enabled. Any async index which fails for {}s would " + "be marked as corrupted and would be skipped from further indexing. A warning log would be " + "logged every {} s", failingIndexTimeoutSeconds, errorWarnIntervalSeconds); } return corruptIndexHandler; }