Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.Daemon


      int ret = secondary.processArgs(argv);
      System.exit(ret);
    }

    // Create a never ending deamon
    Daemon checkpointThread = new Daemon(new SecondaryNameNode(tconf));
    checkpointThread.start();
  }
View Full Code Here


  Daemon jobMonitorThread = null;

  public DistRaidNode(Configuration conf) throws IOException {
    super(conf);
    this.jobMonitor = new JobMonitor(conf);
    this.jobMonitorThread = new Daemon(this.jobMonitor);
    this.jobMonitorThread.start();
   
    LOG.info("created");
  }
View Full Code Here

    for (DatanodeInfo node : namesystem.datanodeReport(DatanodeReportType.LIVE)) {
      liveDatanodes.add(node);
      outStandingHeartbeats.add(node);
    }
    safeModeState = SafeModeState.FAILOVER_IN_PROGRESS;
    safeModeMonitor = new Daemon(new SafeModeMonitor(namesystem, this));
    safeModeMonitor.start();
    try {
      safeModeMonitor.join();
    } catch (InterruptedException ie) {
      throw new IOException("triggerSafeMode() interruped()");
View Full Code Here

    this.sessionInfo.setPoolInfoStrings(
        PoolInfo.createPoolInfoStrings(conf.getPoolInfo()));
    this.sessionInfo.setPriority(SessionPriority.NORMAL);
    this.sessionInfo.setNoPreempt(false);

    this.serverThread = new Daemon(new Thread() {
        @Override
        public void run() {
          server.serve();
        }
      });
    this.serverThread.start();

    incomingCallExecutor = new Daemon(new IncomingCallExecutor());
    incomingCallExecutor.setName("Incoming Call Executor");
    incomingCallExecutor.start();

    cmNotifier = new CMNotifierThread(conf, this);
    sessionId = cmNotifier.getSessionId();
View Full Code Here

    }

    maxLeaseUpdateThreads = conf.getInt("fs.snapshot.leaseupdatethreads", 100);

    // Waiting room purge thread
    purgeThread = new Daemon((new WaitingRoom(conf)).getPurger());
    purgeThread.start();

    // Get namenode rpc connection
    nameNodeAddr = NameNode.getAddress(conf);
    namenode = (NamenodeProtocol) RPC.waitForProxy(NamenodeProtocol.class,
View Full Code Here

    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);
View Full Code Here

     */
    public HadoopThriftHandler(String name) {
      conf = new Configuration();
      now = now();
      try {
        inactivityThread = new Daemon(new InactivityMonitor());
        fs = FileSystem.get(conf);
        if (fs instanceof DistributedFileSystem) {
          namenode = ((DistributedFileSystem)fs).getClient().getNameNodeRPC();
        }
      } catch (IOException e) {
View Full Code Here

        reportStatus("STATE* Safe mode ON.", false);
        return;
      }
      // start monitor
      reached = namesystem.now();
      smmthread = new Daemon(new SafeModeMonitor(namesystem, this));
      smmthread.start();
      reportStatus("STATE* Safe mode extension entered.", true);

      // check if we are ready to initialize replication queues
      if (canInitializeReplQueues() && !namesystem.isPopulatingReplQueues()) {
View Full Code Here

      int ret = secondary.processArgs(argv);
      System.exit(ret);
    }

    // Create a never ending deamon
    Daemon checkpointThread = new Daemon(new SecondaryNameNode(tconf));
    checkpointThread.start();
  }
View Full Code Here

    running = true;
    this.server.start(); // start RPC server


    this.fileFixer = new FileFixer(conf);
    this.fileFixerThread = new Daemon(this.fileFixer);
    fileFixer.setPolicyInfo(configMgr.getAllPolicies());
    this.fileFixerThread.start();

   // start the deamon thread to resync if needed
   this.triggerThread = new Daemon(new TriggerMonitor());
   this.triggerThread.start();
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.util.Daemon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.