Examples of GateScript


Examples of com.asakusafw.windgate.core.GateScript

        Out<Simple> out = tester.output("out1", new Export(Simple.class, "testing", dummy("dummy")));

        JobflowInfo info = tester.compileFlow(new IdentityFlow<Simple>(in, out));

        // extract importer destination
        GateScript importerScript = loadScript(info, "testing", true);
        assertThat(importerScript.getProcesses().size(), is(1));
        ProcessScript<?> importer = getProcess(importerScript, "in1");
        assertThat(importer.getSourceScript().getResourceName(), is("dummy"));
        assertThat(importer.getDrainScript().getResourceName(), is(Constants.HADOOP_FILE_RESOURCE_NAME));
        String importerPath = importer.getDrainScript().getConfiguration().get(FileProcess.FILE.key());
        assertThat(importerPath, is(notNullValue()));
        Location importerLocation = Location.fromPath(importerPath, '/');

        // extract exporter source
        GateScript exporterScript = loadScript(info, "testing", false);
        assertThat(exporterScript.getProcesses().size(), is(1));
        ProcessScript<?> exporter = getProcess(exporterScript, "out1");
        assertThat(exporter.getSourceScript().getResourceName(), is(Constants.HADOOP_FILE_RESOURCE_NAME));
        assertThat(exporter.getDrainScript().getResourceName(), is("dummy"));
        String exporterPath = exporter.getSourceScript().getConfiguration().get(FileProcess.FILE.key());
        assertThat(exporterPath, is(notNullValue()));
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.TABLE.key(), "PAIR");
        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello, world!')");

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.TABLE.key(), "PAIR");
        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.CONDITION.key(), "KEY > 3");

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (4, 'Hello4, world!')");
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.CONDITION.key(), "KEY <= ${max}");

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (4, 'Hello4, world!')");
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.TABLE.key(), "PAIR");
        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
            assertThat(RuntimeContext.get().canExecute(resource), is(true));
            resource.prepare(script);
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.CONDITION.key(), "KEY <= ${INVALID}");

        ProcessScript<Pair> process = process(new DriverScript("jdbc", conf), dummy());
        GateScript script = script(process);

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
            try {
                resource.prepare(script);
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

                "invalid",
                "testing",
                Void.class,
                new DriverScript("jdbc", conf),
                dummy());
        GateScript script = script(process);

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
            try {
                resource.prepare(script);
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.OPERATION.key(), JdbcProcess.OperationKind.INSERT_AFTER_TRUNCATE.value());

        ProcessScript<Pair> process = process(dummy(), new DriverScript("jdbc", conf));
        GateScript script = script(process);

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
            resource.prepare(script);
            DrainDriver<Pair> drain = resource.createDrain(process);
View Full Code Here

Examples of com.asakusafw.windgate.core.GateScript

        conf.put(JdbcProcess.COLUMNS.key(), "KEY,VALUE");
        conf.put(JdbcProcess.JDBC_SUPPORT.key(), PairSupport.class.getName());
        conf.put(JdbcProcess.OPERATION.key(), JdbcProcess.OperationKind.INSERT_AFTER_TRUNCATE.value());

        ProcessScript<Pair> process = process(dummy(), new DriverScript("jdbc", conf));
        GateScript script = script(process);

        JdbcResourceMirror resource = new JdbcResourceMirror(profile(), new ParameterList());
        try {
            resource.prepare(script);
            DrainDriver<Pair> drain = resource.createDrain(process);
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.