Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.ParameterList


    @Test
    public void drain_parameterized() throws Exception {
        HadoopFsMirror resource = new HadoopFsMirror(
                conf,
                profile(),
                new ParameterList(Collections.singletonMap("var", "testing")));
        try {
            ProcessScript<Text> process = drain("target", "${var}");
            resource.prepare(script(process));

            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here


     * drain with multiplevalue.
     * @throws Exception if failed
     */
    @Test
    public void drain_multivalue() throws Exception {
        HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList());
        try {
            ProcessScript<Text> process = drain("target", "testing");
            resource.prepare(script(process));

            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here

     * drain with multiplevalue.
     * @throws Exception if failed
     */
    @Test
    public void drain_multisource() throws Exception {
        HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList());
        try {
            ProcessScript<Text> process = drain("target", "testing1", "testing2", "testing3");
            resource.prepare(script(process));

            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here

     */
    @Test
    public void drain_conflict() throws Exception {
        fs.mkdirs(new Path(working, "CONFLICT"));

        HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList());
        try {
            ProcessScript<Text> process = drain("target", "CONFLICT");
            resource.prepare(script(process));

            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here

     * Attempts to create drain for conflict path.
     * @throws Exception if failed
     */
    @Test
    public void drain_invalid_parameter() throws Exception {
        HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList());
        try {
            ProcessScript<Text> process = drain("target", "${INVALID}");
            resource.prepare(script(process));

            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here

     */
    @Test
    public void drain_sim() throws Exception {
        RuntimeContext.set(RuntimeContext.DEFAULT.mode(ExecutionMode.SIMULATION));

        HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList());
        try {
            assertThat(RuntimeContext.get().canExecute(resource), is(true));
            ProcessScript<Text> process = drain("target", "testing");
            resource.prepare(script(process));
            DrainDriver<Text> driver = resource.createDrain(process);
View Full Code Here

    public void drain() throws Exception {
        stdIn = folder.newFile("stdin");
        stdOut = folder.newFile("stdout");
        exit = 0;

        MockSshHadoopFsMirror resource = new MockSshHadoopFsMirror(new Configuration(), profile, new ParameterList());
        try {
            ProcessScript<Text> proc = p("p", "INVALID", "", "dummy", "testing");
            resource.prepare(script(proc));
            DrainDriver<Text> driver = resource.createDrain(proc);
            try {
View Full Code Here

        exit = 0;

        MockSshHadoopFsMirror resource = new MockSshHadoopFsMirror(
                new Configuration(),
                profile,
                new ParameterList(Collections.singletonMap("var", "replacement")));
        try {
            ProcessScript<Text> proc = p("p", "INVALID", "", "dummy", "testing-${var}");
            resource.prepare(script(proc));
            DrainDriver<Text> driver = resource.createDrain(proc);
            try {
View Full Code Here

    public void drain_multiple() throws Exception {
        stdIn = folder.newFile("stdin");
        stdOut = folder.newFile("stdout");
        exit = 0;

        MockSshHadoopFsMirror resource = new MockSshHadoopFsMirror(new Configuration(), profile, new ParameterList());
        try {
            ProcessScript<Text> proc = p("p", "INVALID", "", "dummy", "testing");
            resource.prepare(script(proc));
            DrainDriver<Text> driver = resource.createDrain(proc);
            try {
View Full Code Here

    public void drain_nullpath() throws Exception {
        stdIn = folder.newFile("stdin");
        stdOut = folder.newFile("stdout");
        exit = 0;

        MockSshHadoopFsMirror resource = new MockSshHadoopFsMirror(new Configuration(), profile, new ParameterList());
        try {
            ProcessScript<Text> proc = p("p", "INVALID", "", "dummy", null);
            resource.prepare(script(proc));
            DrainDriver<Text> driver = resource.createDrain(proc);
            driver.close();
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.ParameterList

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.