boolean useCorruptFileCounter =
!conf.getBoolean(RAID_DISABLE_CORRUPTFILE_COUNTER_KEY, false);
Runnable fixer = blockIntegrityMonitor.getCorruptionMonitor();
if (useBlockFixer && (fixer != null)) {
this.blockFixerThread = new Daemon(fixer);
this.blockFixerThread.setName("Block Fixer");
this.blockFixerThread.start();
}
Runnable copier = blockIntegrityMonitor.getDecommissioningMonitor();
if (useBlockCopier && (copier != null)) {
this.blockCopierThread = new Daemon(copier);
this.blockCopierThread.setName("Block Copier");
this.blockCopierThread.start();
}
Runnable counter = blockIntegrityMonitor.getCorruptFileCounter();
if (useCorruptFileCounter && counter != null) {
this.corruptFileCounterThread = new Daemon(counter);
this.corruptFileCounterThread.setName("Corrupt File Counter");
this.corruptFileCounterThread.start();
}
// start the deamon thread to fire polcies appropriately
RaidNode.triggerMonitorSleepTime = conf.getLong(
TRIGGER_MONITOR_SLEEP_TIME_KEY,
SLEEP_TIME);
this.triggerThread = new Daemon(new TriggerMonitor());
this.triggerThread.setName("Trigger Thread");
this.triggerThread.start();
// start the thread that monitor and moves blocks
this.placementMonitor = new PlacementMonitor(conf);
this.placementMonitor.start();
// start the thread that deletes obsolete parity files
this.purgeMonitor = new PurgeMonitor(conf, placementMonitor);
this.purgeThread = new Daemon(purgeMonitor);
this.purgeThread.setName("Purge Thread");
this.purgeThread.start();
// start the thread that creates HAR files
this.harThread = new Daemon(new HarMonitor());
this.harThread.setName("HAR Thread");
this.harThread.start();
// start the thread that collects statistics
this.statsCollector = new StatisticsCollector(this, configMgr, conf);
this.statsCollectorThread = new Daemon(statsCollector);
this.statsCollectorThread.setName("Stats Collector");
this.statsCollectorThread.start();
this.directoryTraversalShuffle =
conf.getBoolean(RAID_DIRECTORYTRAVERSAL_SHUFFLE, true);