Source:
AsyncLocalizer(Map<String, Object> conf, AdvancedFSOps ops, String baseDir, StormMetricsRegistry metricsRegistry) throws IOException { this.conf = conf; this.singleBlobLocalizationDuration = metricsRegistry.registerTimer("supervisor:single-blob-localization-duration"); this.blobCacheUpdateDuration = metricsRegistry.registerTimer("supervisor:blob-cache-update-duration"); this.blobLocalizationDuration = metricsRegistry.registerTimer("supervisor:blob-localization-duration"); this.numBlobUpdateVersionChanged = metricsRegistry.registerMeter("supervisor:num-blob-update-version-changed"); this.localResourceFileNotFound = metricsRegistry.registerMeter("supervisdor:local-resource-file-not-found"); this.metricsRegistry = metricsRegistry; isLocalMode = ConfigUtils.isLocalMode(conf); fsOps = ops; localBaseDir = Paths.get(baseDir); cacheTargetSize = ObjectReader.getInt(conf.get(DaemonConfig.SUPERVISOR_LOCALIZER_CACHE_TARGET_SIZE_MB), 10 * 1024).longValue() << 20; cacheCleanupPeriod = ObjectReader.getInt(conf.get( DaemonConfig.SUPERVISOR_LOCALIZER_CACHE_CLEANUP_INTERVAL_MS), 30 * 1000).longValue(); blobDownloadRetries = ObjectReader.getInt(conf.get( DaemonConfig.SUPERVISOR_BLOBSTORE_DOWNLOAD_MAX_RETRIES), 3); int downloadThreadPoolSize = ObjectReader.getInt(conf.get(DaemonConfig.SUPERVISOR_BLOBSTORE_DOWNLOAD_THREAD_COUNT), 5); downloadExecService = Executors.newScheduledThreadPool(downloadThreadPoolSize, new ThreadFactoryBuilder().setNameFormat("AsyncLocalizer Download Executor - %d").build()); taskExecService = Executors.newScheduledThreadPool(3, new ThreadFactoryBuilder().setNameFormat("AsyncLocalizer Task Executor - %d").build()); reconstructLocalizedResources(); symlinksDisabled = (boolean) conf.getOrDefault(Config.DISABLE_SYMLINKS, false); blobPending = new ConcurrentHashMap<>(); }

Target:
AsyncLocalizer(Map<String, Object> conf, AdvancedFSOps ops, String baseDir, StormMetricsRegistry metricsRegistry) throws IOException { this.conf = conf; this.singleBlobLocalizationDuration = metricsRegistry.registerTimer("supervisor:single-blob-localization-duration"); this.blobCacheUpdateDuration = metricsRegistry.registerTimer("supervisor:blob-cache-update-duration"); this.blobLocalizationDuration = metricsRegistry.registerTimer("supervisor:blob-localization-duration"); this.numBlobUpdateVersionChanged = metricsRegistry.registerMeter("supervisor:num-blob-update-version-changed"); this.localResourceFileNotFoundWhenReleasingSlot = metricsRegistry.registerMeter("supervisor:local-resource-file-not-found-when-releasing-slot"); this.metricsRegistry = metricsRegistry; isLocalMode = ConfigUtils.isLocalMode(conf); fsOps = ops; localBaseDir = Paths.get(baseDir); cacheTargetSize = ObjectReader.getInt(conf.get(DaemonConfig.SUPERVISOR_LOCALIZER_CACHE_TARGET_SIZE_MB), 10 * 1024).longValue() << 20; cacheCleanupPeriod = ObjectReader.getInt(conf.get( DaemonConfig.SUPERVISOR_LOCALIZER_CACHE_CLEANUP_INTERVAL_MS), 30 * 1000).longValue(); blobDownloadRetries = ObjectReader.getInt(conf.get( DaemonConfig.SUPERVISOR_BLOBSTORE_DOWNLOAD_MAX_RETRIES), 3); int downloadThreadPoolSize = ObjectReader.getInt(conf.get(DaemonConfig.SUPERVISOR_BLOBSTORE_DOWNLOAD_THREAD_COUNT), 5); downloadExecService = Executors.newScheduledThreadPool(downloadThreadPoolSize, new ThreadFactoryBuilder().setNameFormat("AsyncLocalizer Download Executor - %d").build()); taskExecService = Executors.newScheduledThreadPool(3, new ThreadFactoryBuilder().setNameFormat("AsyncLocalizer Task Executor - %d").build()); reconstructLocalizedResources(); symlinksDisabled = (boolean) conf.getOrDefault(Config.DISABLE_SYMLINKS, false); blobPending = new ConcurrentHashMap<>(); }