Esempio n. 1
0
 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.");
     }
 }
Esempio n. 2
0
 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);
 }