@Override public Thread newThread(Runnable runnable) { return new Daemon(runnable); }
public void start() { Preconditions.checkState(monitorThread == null, "JvmPauseMonitor thread is Already started"); monitorThread = new Daemon(new Monitor()); monitorThread.start(); }
public void start() { Preconditions.checkState(monitorThread == null, "JvmPauseMonitor thread is Already started"); monitorThread = new Daemon(new Monitor()); monitorThread.start(); }
@Override public synchronized void startThreads() throws IOException { try { // updateCurrentKey needs to be called to initialize the master key // (there should be a null check added in the future in rollMasterKey) // updateCurrentKey(); Method m = AbstractDelegationTokenSecretManager.class.getDeclaredMethod("updateCurrentKey"); m.setAccessible(true); m.invoke(this); } catch (Exception e) { throw new IOException("Failed to initialize master key", e); } running = true; tokenRemoverThread = new Daemon(new ExpiredTokenRemover()); tokenRemoverThread.start(); }
/** should be called before this object is used */ public void startThreads() throws IOException { Preconditions.checkState(!running); updateCurrentKey(); synchronized (this) { running = true; tokenRemoverThread = new Daemon(new ExpiredTokenRemover()); tokenRemoverThread.start(); } }
@Override protected void serviceStart() throws Exception { monitorThread = new Daemon(new Monitor()); monitorThread.start(); super.serviceStart(); }
public void startCheckpointThread() { Preconditions.checkState(checkpointThread == null, "Should not already have a thread"); Preconditions.checkState(shouldRun, "shouldRun should be true"); checkpointThread = new Daemon(this); checkpointThread.start(); }
public Daemon recoverBlocks(final String who, final Collection<RecoveringBlock> blocks) { Daemon d = new Daemon(datanode.threadGroup, new Runnable() { @Override public void run() { for(RecoveringBlock b : blocks) { try { logRecoverBlock(who, b); if (b.isStriped()) { new RecoveryTaskStriped((RecoveringStripedBlock) b).recover(); } else { new RecoveryTaskContiguous(b).recover(); } } catch (IOException e) { LOG.warn("recoverBlocks FAILED: " + b, e); } } } }); d.start(); return d; } }
/** * Initializes block movement tracker daemon and starts the thread. */ private void startMovementTracker() { movementTrackerThread = new Daemon(this.blkMovementTracker); movementTrackerThread.setName("BlockStorageMovementTracker"); movementTrackerThread.start(); }
public void activate() { pathIdCollector = new Daemon(pathIDProcessor); pathIdCollector.setName("SPSPathIdProcessor"); pathIdCollector.start(); }
void startMonitor() { Preconditions.checkState(lmthread == null, "Lease Monitor already running"); shouldRunMonitor = true; lmthread = new Daemon(new Monitor()); lmthread.start(); }
private void startDiskOutlierDetectionThread() { slowDiskDetectionDaemon = new Daemon(new Runnable() { @Override public void run() {
void start() { timerThread = new Daemon(new PendingReconstructionMonitor()); timerThread.start(); }
trashCleaner = new Daemon(new Runnable() { @Override public void run() {
/** * Starts the monitor thread. */ public synchronized void start() { monitorRunning = true; timerThread = new Daemon(new BlocksStorageMovementAttemptMonitor()); timerThread.setName("BlocksStorageMovementAttemptMonitor"); timerThread.start(); }
/** * Start storage policy satisfier demon thread. Also start block storage * movements monitor for retry the attempts if needed. */ @Override public synchronized void start(StoragePolicySatisfierMode serviceMode) { if (serviceMode == StoragePolicySatisfierMode.NONE) { LOG.error("Can't start StoragePolicySatisfier for the given mode:{}", serviceMode); return; } LOG.info("Starting {} StoragePolicySatisfier.", StringUtils.toLowerCase(serviceMode.toString())); isRunning = true; storagePolicySatisfierThread = new Daemon(this); storagePolicySatisfierThread.setName("StoragePolicySatisfier"); storagePolicySatisfierThread.start(); this.storageMovementsMonitor.start(); this.storageMovementNeeded.activate(); dnCacheMgr = new DatanodeCacheManager(conf); }
new Daemon(new Runnable() { @Override public void run() {
new Daemon(new Runnable() { @Override public void run() {
this.threadGroup = new ThreadGroup("dataXceiverServer"); xserver = new DataXceiverServer(tcpPeerServer, getConf(), this); this.dataXceiverServer = new Daemon(threadGroup, xserver); this.threadGroup.setDaemon(true); // auto destroy when empty getDomainPeerServer(getConf(), streamingAddr.getPort()); if (domainPeerServer != null) { this.localDataXceiverServer = new Daemon(threadGroup, new DataXceiverServer(domainPeerServer, getConf(), this)); LOG.info("Listening on UNIX domain socket: {}",
Daemon daemon = new Daemon(threadGroup, new DataTransfer(targets, targetStorageTypes, targetStorageIds, b, stage, client));