Examples of Daemon


Examples of org.apache.hadoop.util.Daemon

   
    buildINodeToParentMap();
   
    lastNodeCompletionTime = System.currentTimeMillis();
   
    monitorThread = new Daemon(new UpgradeMonitor());
    monitorThread.start();   
   
    return super.startUpgrade();
  }
View Full Code Here

Examples of org.apache.hadoop.util.Daemon

    final File tmpDir = sd.getFinalizedTmp();
    // rename previous to tmp
    rename(prevDir, tmpDir);

    // delete tmp dir in a separate thread
    new Daemon(new Runnable() {
        public void run() {
          try {
            deleteDir(tmpDir);
          } catch(IOException ex) {
            LOG.error("Finalize upgrade for " + dataDirPath + " failed.", ex);
View Full Code Here

Examples of org.apache.hadoop.util.Daemon

          + getUpgradeVersion());
    upgradeState = true;
    UpgradeObjectDatanode curUO = (UpgradeObjectDatanode)currentUpgrades.first();
    curUO.setDatanode(dataNode);
    curUO.startUpgrade();
    upgradeDaemon = new Daemon(curUO);
    upgradeDaemon.start();
    DataNode.LOG.info("\n   Distributed upgrade for DataNode version "
        + getUpgradeVersion() + " to current LV "
        + FSConstants.LAYOUT_VERSION + " is started.");
    return true;
View Full Code Here

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

Examples of org.apache.jetspeed.daemon.Daemon

    */
    public Daemon getDaemon( DaemonEntry entry ) throws DaemonException {

        //FIX ME: before instantiating a daemon ... find out if it is already setup
       
        Daemon daemon = (Daemon)this.daemons.get( entry );
       
        if( daemon != null ) {
            return daemon;
        } else {
            logger.info( "Creating daemon: " + entry.getName() );
        }
       
        try {

            daemon = (Daemon)Class.forName( entry.getClassname() ).newInstance();

            DaemonConfig dc = new DaemonConfig();
           
            daemon.init( dc, entry );
           
            this.daemons.put( entry, daemon );
           
            return daemon;
           
View Full Code Here

Examples of org.codehaus.mojo.appassembler.model.Daemon

    private void testNormalShellScriptGeneration( Platform platform )
        throws Exception
    {
        ScriptGenerator generator = (ScriptGenerator) lookup( ScriptGenerator.ROLE );

        Daemon daemon = new Daemon();

        daemon.setId( "test" );
        daemon.setMainClass( "foo.Bar" );
        daemon.setJvmSettings( new JvmSettings() );
        daemon.getJvmSettings().setExtraArguments( Arrays.asList( new String[]{"Yo", "dude"} ) );
        daemon.setEnvironmentSetupFileName( "setup" );
        daemon.setRepositoryName("repo");
        File outputDirectory = getTestFile( "target/test-output/normal-shell/" + platform.getName() );

        generator.createBinScript( platform.getName(), daemon, outputDirectory );

        File expectedFile = getTestFile( PREFIX + "expected-" + daemon.getId() + platform.getBinFileExtension() );
        File actualFile = new File( outputDirectory, "bin/" + daemon.getId() + platform.getBinFileExtension() );

        assertEquals( FileUtils.fileRead( expectedFile ), FileUtils.fileRead( actualFile ) );
    }
View Full Code Here

Examples of org.eclipse.jgit.transport.Daemon

    }
    return randstring.toString();
  }

  private void serve() throws IOException {
    d = new Daemon();
    FileResolver<DaemonClient> resolver = new FileResolver<DaemonClient>();
    resolver.exportRepository(REPO_NAME, src.getRepository());
    d.setRepositoryResolver(resolver);
    d.start();
    uri = "git://localhost:" + d.getAddress().getPort() + "/" + REPO_NAME
View Full Code Here

Examples of org.gradle.launcher.daemon.server.Daemon

        DaemonServices daemonServices = new DaemonServices(parameters, loggingRegistry, loggingManager);
        File daemonLog = daemonServices.getDaemonLogFile();

        initialiseLogging(loggingManager, daemonLog);

        Daemon daemon = daemonServices.get(Daemon.class);
        daemon.start();

        try {
            DaemonContext daemonContext = daemonServices.get(DaemonContext.class);
            Long pid = daemonContext.getPid();
            daemonStarted(pid, daemon.getUid(), daemon.getAddress(), daemonLog);

            // Block until idle
            daemon.requestStopOnIdleTimeout(parameters.getIdleTimeout(), TimeUnit.MILLISECONDS);
        } finally {
            daemon.stop();
        }
    }
View Full Code Here

Examples of org.skife.gressil.Daemon

public class ChattyDaemon
{
    public static void main(String[] args) throws IOException
    {
        new Daemon().withMainArgs(args)
                    .withPidFile(new File("/tmp/chatty.pid"))
                    .withStdout(new File("/tmp/chatty.out"))
                    .withExtraMainArgs("hello", "world,", "how are you?")
                    .withExtraJvmArgs(remoteDebugOnPort(5005))
                    .daemonize();
View Full Code Here

Examples of org.uberfire.java.nio.fs.jgit.daemon.git.Daemon

        gitSSHService.start();
    }

    void buildAndStartDaemon() {
        if ( daemonService == null || !daemonService.isRunning() ) {
            daemonService = new Daemon( new InetSocketAddress( DAEMON_HOST_ADDR, DAEMON_PORT ) );
            daemonService.setRepositoryResolver( new RepositoryResolverImpl<DaemonClient>() );
            try {
                daemonService.start();
            } catch ( java.io.IOException e ) {
                throw new IOException( e );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.