public BlockScanner(DataNode datanode, Configuration conf) { this.datanode = datanode; this.conf = new BlockScanner.Conf(conf); if (IsEnabled()) { Log.Info("Initialized block scanner with targetBytesPerSec {}", this.conf.targetBytesPerSec ); } else { Log.Info("Disabled block scanner."); } }
internal VolumeScanner(BlockScanner.Conf conf, DataNode datanode, FsVolumeReference @ref) { this.conf = conf; this.datanode = datanode; this.@ref = @ref; this.volume = @ref.GetVolume(); VolumeScanner.ScanResultHandler handler; try { handler = System.Activator.CreateInstance(conf.resultHandler); } catch (Exception e) { Log.Error("unable to instantiate {}", conf.resultHandler, e); handler = new VolumeScanner.ScanResultHandler(); } this.resultHandler = handler; SetName("VolumeScannerThread(" + volume.GetBasePath() + ")"); SetDaemon(true); }