Package cascading.pipe

Examples of cascading.pipe.Pipe


        Tap in = sourceTap();
        // use an existing id to allow the update to succeed
        Tap out = new EsTap("cascading-local/upsert-script", new Fields("id", "name", "url", "picture"));

        Pipe pipe = new Pipe("copy");
        build(properties, in, out, pipe);
    }
View Full Code Here


        Tap in = sourceTap();
        // use an existing id to allow the update to succeed
        Tap out = new EsTap("cascading-local/upsert-param-script", new Fields("id", "name", "url", "picture"));

        Pipe pipe = new Pipe("copy");
        build(properties, in, out, pipe);
    }
View Full Code Here

        Tap in = sourceTap();
        // use an existing id to allow the update to succeed
        Tap out = new EsTap("cascading-local/upsert-script-json-script", new Fields("id", "name", "url", "picture"));

        Pipe pipe = new Pipe("copy");
        build(properties, in, out, pipe);
    }
View Full Code Here

        build(properties, in, out, pipe);
    }

    @Test
    public void testCascadeConnector() {
        Pipe copy = new Pipe("copy");
        Properties cfg = new TestSettings().getProperties();

        FlowDef flow = new FlowDef().addSource(copy, sourceTap()).addTailSink(copy,
                new EsTap("cascading-local/cascade-connector"));
View Full Code Here

    }

    @Test
    public void testReadFromES() throws Exception {
        Tap in = new EsTap("cascading-local/artists", query);
        Pipe pipe = new Pipe("copy");
        pipe = new Each(pipe, new FilterNotNull());
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertSizeLessThan(5));
        // can't select when using unknown
        //pipe = new Each(pipe, new Fields("name"), AssertionLevel.STRICT, new AssertNotNull());
        pipe = new GroupBy(pipe);
View Full Code Here

    }

    @Test
    public void testReadFromESWithFields() throws Exception {
        Tap in = new EsTap("cascading-local/artists", query, new Fields("url", "name"));
        Pipe pipe = new Pipe("copy");
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertSizeEquals(2));
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertNotNull());
        pipe = new GroupBy(pipe);
        pipe = new Every(pipe, new Count());
View Full Code Here

    }

    @Test
    public void testReadFromESAliasedField() throws Exception {
        Tap in = new EsTap("cascading-local/alias", query, new Fields("address"));
        Pipe pipe = new Pipe("copy");
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertNotNull());
        pipe = new GroupBy(pipe);
        pipe = new Every(pipe, new Count());

        // print out
View Full Code Here

    }

    @Test
    public void testReadFromESWithFieldAlias() throws Exception {
        Tap in = new EsTap("cascading-local/alias", query, new Fields("url"));
        Pipe pipe = new Pipe("copy");
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertNotNull());
        pipe = new GroupBy(pipe);
        pipe = new Every(pipe, new Count());

        // print out
View Full Code Here

        props.put(ConfigurationOptions.ES_INPUT_JSON, "true");

        Tap in = sourceTap();
        Tap out = new EsTap("json-cascading-local/artists");

        Pipe pipe = new Pipe("copy");
        build(props, in, out, pipe);
    }
View Full Code Here

        properties.put(ConfigurationOptions.ES_INDEX_AUTO_CREATE, "false");
        properties.put(ConfigurationOptions.ES_INPUT_JSON, "true");

        Tap in = sourceTap();
        Tap out = new EsTap("json-cascading-local/non-existing", new Fields("line"));
        Pipe pipe = new Pipe("copy");
        build(properties, in, out, pipe);
    }
View Full Code Here

TOP

Related Classes of cascading.pipe.Pipe

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.