Package com.asakusafw.yaess.core

Examples of com.asakusafw.yaess.core.VariableResolver


        Map<String, String> config = new HashMap<String, String>();
        config.put(JschProcessExecutor.KEY_USER, System.getProperty("user.name"));
        config.put(JschProcessExecutor.KEY_HOST, "localhost");
        config.put(JschProcessExecutor.KEY_PRIVATE_KEY, privateKey.getAbsolutePath());

        VariableResolver resolver = VariableResolver.system();

        JschProcessExecutor extracted = JschProcessExecutor.extract("testing", config, resolver);
        try {
            int exit = extracted.execute(
                    new ExecutionContext("b", "f", "e", ExecutionPhase.MAIN, Collections.<String, String>emptyMap()),
View Full Code Here


        Map<String, String> config = new HashMap<String, String>();
        config.put(JschProcessExecutor.KEY_USER, System.getProperty("user.name"));
        config.put(JschProcessExecutor.KEY_HOST, "localhost");
        config.put(JschProcessExecutor.KEY_PRIVATE_KEY, privateKey.getAbsolutePath());

        VariableResolver resolver = VariableResolver.system();

        JschProcessExecutor extracted = JschProcessExecutor.extract("testing", config, resolver);
        try {
            Map<String, String> env = new HashMap<String, String>();
            env.put("file1", file1.getAbsolutePath());
View Full Code Here

        Map<String, String> config = new HashMap<String, String>();
        config.put(JschProcessExecutor.KEY_USER, System.getProperty("user.name"));
        config.put(JschProcessExecutor.KEY_HOST, "localhost");
        config.put(JschProcessExecutor.KEY_PRIVATE_KEY, privateKey.getAbsolutePath());

        VariableResolver resolver = VariableResolver.system();

        JschProcessExecutor extracted = JschProcessExecutor.extract("testing", config, resolver);
        try {
            int exit = extracted.execute(
                    new ExecutionContext("b", "f", "e", ExecutionPhase.MAIN, Collections.<String, String>emptyMap()),
View Full Code Here

        Map<String, String> config = new HashMap<String, String>();
        config.put(JschProcessExecutor.KEY_USER, System.getProperty("user.name"));
        config.put(JschProcessExecutor.KEY_HOST, "localhost");
        config.put(JschProcessExecutor.KEY_PRIVATE_KEY, privateKey.getAbsolutePath());

        VariableResolver resolver = VariableResolver.system();

        JschProcessExecutor extracted = JschProcessExecutor.extract("testing", config, resolver);
        try {
            int exit = extracted.execute(
                    new ExecutionContext("b", "f", "e", ExecutionPhase.MAIN, Collections.<String, String>emptyMap()),
View Full Code Here

        Map<String, String> config = new HashMap<String, String>();
        config.put(JschProcessExecutor.KEY_USER, System.getProperty("user.name"));
        config.put(JschProcessExecutor.KEY_HOST, "localhost");
        config.put(JschProcessExecutor.KEY_PRIVATE_KEY, privateKey.getAbsolutePath());

        VariableResolver resolver = VariableResolver.system();

        JschProcessExecutor extracted = JschProcessExecutor.extract("testing", config, resolver);
        try {
            Map<String, String> env = new HashMap<String, String>();
            env.put("file", file.getAbsolutePath());
View Full Code Here

                PREFIX,
                CommandScriptHandlerDispatcher.class,
                conf,
                new ProfileContext(
                        getClass().getClassLoader(),
                        new VariableResolver(Collections.<String, String>emptyMap())));
        return profile.newInstance();
    }
View Full Code Here

    QueueHadoopScriptHandler create() {
        ServiceProfile<QueueHadoopScriptHandler> profile = new ServiceProfile<QueueHadoopScriptHandler>(
                "testing",
                QueueHadoopScriptHandler.class,
                map("prop.s", "service", "1.url", "http://example.com"),
                new ProfileContext(getClass().getClassLoader(), new VariableResolver(map())));
        try {
            return profile.newInstance();
        } catch (Exception e) {
            throw new AssertionError(e);
        }
View Full Code Here

     */
    @Test
    public void with_variable() throws Exception {
        File lockDir = folder.getRoot();
        int start = lockDir.list().length;
        VariableResolver var = new VariableResolver(Collections.singletonMap(
                "LOCATION", lockDir.getAbsolutePath()));
        Map<String, String> conf = new HashMap<String, String>();
        conf.put(BasicLockProvider.KEY_DIRECTORY, "${LOCATION}");

        ServiceProfile<ExecutionLockProvider> profile = new ServiceProfile<ExecutionLockProvider>(
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = IOException.class)
    public void invalid_variable() throws Exception {
        File lockDir = folder.getRoot();
        VariableResolver var = new VariableResolver(Collections.singletonMap(
                "LOCATION", lockDir.getAbsolutePath()));
        Map<String, String> conf = new HashMap<String, String>();
        conf.put(BasicLockProvider.KEY_DIRECTORY, "${__INVALID__}");

        ServiceProfile<ExecutionLockProvider> profile = new ServiceProfile<ExecutionLockProvider>(
View Full Code Here

                "testing",
                QueueHadoopScriptHandler.class,
                map(new String[] {
                        "1.url", "http://www.example.com/jobqueue"
                }),
                new ProfileContext(getClass().getClassLoader(), new VariableResolver(map(new String[] {
                }))));
        JobClientProfile profile = JobClientProfile.convert(original);
        assertThat(profile.getPrefix(), is("testing"));
        assertThat(profile.getTimeout(), is(JobClientProfile.DEFAULT_TIMEOUT));
        assertThat(profile.getPollingInterval(), is(JobClientProfile.DEFAULT_POLLING_INTERVAL));
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.core.VariableResolver

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.