Examples of ProcessController


Examples of io.fabric8.process.manager.ProcessController

        installContext.updateContainerChecksums();

        if (installContext.isRestartRequired()) {
            LOG.info("Restarting " + container.getId() + " due to profile changes: " + installContext.getRestartReasons());
            ProcessController controller = installation.getController();
            if (controller != null && container != null && container.isAlive()) {
                controller.restart();
            }
        }
    }
View Full Code Here

Examples of io.fabric8.process.manager.ProcessController

        // such as the operating system PATH or FABRIC8_JAVA8_HOME when not using docker containers
        JolokiaAgentHelper.substituteEnvironmentVariableExpressions(environmentVariables, System.getenv(), null, null, true);
    }

    protected static ProcessConfig getProcessConfig(Installation installation) {
        ProcessController controller = installation.getController();
        return controller.getConfig();
    }
View Full Code Here

Examples of io.fabric8.process.manager.ProcessController

        String id = requirements.getId();

        Installation installation = findProcessInstallation(id);
        // for now lets remove it just in case! :)
        if (installation != null) {
            ProcessController controller = installation.getController();
            try {
                controller.stop();
            } catch (Exception e) {
                LOG.warn("Ignored exception while trying to stop process " + installation + " " + e);
            }
            controller.uninstall();
            controller = null;
        }
    }
View Full Code Here

Examples of io.fabric8.process.manager.ProcessController

        // TODO we should support different kinds of controller based on the kind of installation
        // we could maybe discover a descriptor file to describe how to control the process?
        // or generate this file on installation time?

        File installDir = findInstallDir(rootDir);
        ProcessController controller = createController(id, config, rootDir, installDir);
        // TODO need to read the URL from somewhere...
        Installation installation = new Installation(url, id, installDir, controller, config);
        installations.put(id, installation);
        return installation;
    }
View Full Code Here

Examples of io.fabric8.process.manager.ProcessController

    private void updateConfig(String pid, Installation installation, Map<String, String> env) throws ConfigurationException {

        try {

            final ProcessController controller = installation.getController();
            final boolean running = (controller.status() == 0);

            // stop if running, since config may not be changed while process is running
            if (running) {
                controller.stop();
            }

            // refresh environment variables in process config
            installation.getEnvironment().putAll(env);

            // re-configure the install using new environment variables
            controller.configure();

            // restart if it was running before
            if (running) {
                controller.start();
            }

        } catch (Exception e) {
            String msg = "Error updating process " + pid + ": " + e.getMessage();
            LOG.error(msg, e);
View Full Code Here

Examples of org.broadinstitute.gatk.utils.runtime.ProcessController

    }

    @Test(dataProvider = "ExtensionsTest")
    public void testExtensions(final CatVariantsTestProvider cfg) throws IOException {

        ProcessController pc = ProcessController.getThreadLocal();
        ProcessSettings ps = new ProcessSettings(cfg.getCmdLine().split("\\s+"));
        pc.execAndCheck(ps);

        MD5DB.MD5Match result = md5db.testFileMD5("testExtensions", "CatVariantsTestProvider", cfg.outputFile, cfg.md5, false);
        if(result.failed) {
            final MD5Mismatch failure = new MD5Mismatch(result.actualMD5, result.expectedMD5, result.diffEngineOutput);
            Assert.fail(failure.toString());
View Full Code Here

Examples of org.broadinstitute.gatk.utils.runtime.ProcessController

                BaseTest.b37KGReference,
                CatVariantsVcf1,
                CatVariantsVcf2,
                BaseTest.createTempFile("CatVariantsTest", ".bcf"));

        ProcessController pc = ProcessController.getThreadLocal();
        ProcessSettings ps = new ProcessSettings(cmdLine.split("\\s+"));
        pc.execAndCheck(ps);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.utils.runtime.ProcessController

                BaseTest.b37KGReference,
                CatVariantsVcf1,
                CatVariantsBcf2,
                BaseTest.createTempFile("CatVariantsTest", ".vcf"));

        ProcessController pc = ProcessController.getThreadLocal();
        ProcessSettings ps = new ProcessSettings(cmdLine.split("\\s+"));
        pc.execAndCheck(ps);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.utils.runtime.ProcessController

            if (logger.isDebugEnabled()) {
                processSettings.getStdoutSettings().printStandard(true);
                processSettings.getStderrSettings().printStandard(true);
            }

            ProcessController controller = ProcessController.getThreadLocal();

            if (logger.isDebugEnabled()) {
                logger.debug("Executing:");
                for (String arg: cmd)
                    logger.debug("  " + arg);
            }
            int exitValue = controller.exec(processSettings).getExitValue();
            logger.debug("Result: " + exitValue);

            if (exitValue != 0)
                throw new RScriptExecutorException(
                        "RScript exited with " + exitValue +
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.