Source:
<code><START> HelixAccountService(HelixPropertyStore<ZNRecord> helixStore, AccountServiceMetrics accountServiceMetrics, <END> Notifier<String> notifier, ScheduledExecutorService scheduler, HelixAccountServiceConfig config) throws IOException { this.helixStore = Objects.requireNonNull(helixStore, "helixStore cannot be null"); this.accountServiceMetrics = Objects.requireNonNull(accountServiceMetrics, "accountServiceMetrics cannot be null"); this.notifier = notifier; this.scheduler = scheduler; this.config = config; backupDirPath = config.backupDir.isEmpty() ? null : Files.createDirectories(Paths.get(config.backupDir)); if (notifier != null) { notifier.subscribe(ACCOUNT_METADATA_CHANGE_TOPIC, this::onAccountChangeMessage); } else { logger.warn("Notifier is null. Account updates cannot be notified to other entities. Local account cache may not " + "be in sync with remote account data."); accountServiceMetrics.nullNotifierCount.inc(); } Runnable updater = () -> { try { readFullAccountAndUpdateCache(FULL_ACCOUNT_METADATA_PATH, false); } catch (Exception e) { logger.error("Exception occurred when fetching remote account data", e); accountServiceMetrics.fetchRemoteAccountErrorCount.inc(); } }; updater.run(); if (scheduler != null) { int initialDelay = new Random().nextInt(config.updaterPollingIntervalMs + 1); scheduler.scheduleAtFixedRate(updater, initialDelay, config.updaterPollingIntervalMs, TimeUnit.MILLISECONDS); logger.info( "Background account updater will fetch accounts from remote starting ms from now and repeat with interval={} ms", initialDelay, config.updaterPollingIntervalMs); } open.set(true); }</code><technical_language>IOException from? include in description</technical_language>

Target:
HelixAccountService(HelixPropertyStore<ZNRecord> helixStore, AccountServiceMetrics accountServiceMetrics, Notifier<String> notifier, ScheduledExecutorService scheduler, HelixAccountServiceConfig config) throws IOException { this.helixStore = Objects.requireNonNull(helixStore, "helixStore cannot be null"); this.accountServiceMetrics = Objects.requireNonNull(accountServiceMetrics, "accountServiceMetrics cannot be null"); this.notifier = notifier; this.scheduler = scheduler; this.config = config; backupDirPath = config.backupDir.isEmpty() ? null : Files.createDirectories(Paths.get(config.backupDir)); if (notifier != null) { notifier.subscribe(ACCOUNT_METADATA_CHANGE_TOPIC, this::onAccountChangeMessage); } else { logger.warn("Notifier is null. Account updates cannot be notified to other entities. Local account cache may not " + "be in sync with remote account data."); accountServiceMetrics.nullNotifierCount.inc(); } Runnable updater = () -> { try { readFullAccountAndUpdateCache(FULL_ACCOUNT_METADATA_PATH, false); } catch (Exception e) { logger.error("Exception occurred when fetching remote account data", e); accountServiceMetrics.fetchRemoteAccountErrorCount.inc(); } }; updater.run(); if (scheduler != null) { int initialDelay = new Random().nextInt(config.updaterPollingIntervalMs + 1); scheduler.scheduleAtFixedRate(updater, initialDelay, config.updaterPollingIntervalMs, TimeUnit.MILLISECONDS); logger.info( "Background account updater will fetch accounts from remote starting ms from now and repeat with interval={} ms", initialDelay, config.updaterPollingIntervalMs); } }