Examples of TestSettings


Examples of http_parser.lolevel.TestLoaderNG.TestSettings

  void execute () {
    p(name);
    ByteBuffer   buf = ByteBuffer.wrap(raw);
    HTTPParser     p = new HTTPParser();
    TestSettings s = settings();



    p.execute(s, buf);
    if (!s.success) {
View Full Code Here

Examples of http_parser.lolevel.TestLoaderNG.TestSettings

       */
    p(name);
    for (int i = 2; i != raw.length; ++i) {
      //  p(i);
      HTTPParser   p = new HTTPParser();
      TestSettings s = settings();
      ByteBuffer buf = ByteBuffer.wrap(raw);
      int olimit = buf.limit();
      buf.limit(i);

      parse(p,s,buf);
View Full Code Here

Examples of http_parser.lolevel.TestLoaderNG.TestSettings

    //p("About to parse: "+b.position() + "->" + b.limit());
    p.execute(s, b);
  }

  TestSettings settings() {
    final TestSettings s = new TestSettings();
    s.on_path         = getCB(request_path, "path", s);
    s.on_query_string = getCB(query_string, "query_string", s);
    s.on_url          = getCB(request_url,  "url", s);
    s.on_fragment     = getCB(fragment,     "fragment", s);
    s.on_message_begin = new HTTPCallback() {
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

        // local file-system source
        Tap in = sourceTap();
        Tap out = new EsTap("cascading-local/artists", new Fields("name", "url", "picture"));

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

Examples of org.elasticsearch.hadoop.util.TestSettings

        Pipe pipe = new Pipe("copy");

        // rename "id" -> "garbage"
        pipe = new Each(pipe, new Identity(new Fields("garbage", "name", "url", "picture", "ts")));

        Properties props = new TestSettings().getProperties();
        props.setProperty("es.mapping.names", "url:address");
        build(props, in, out, pipe);
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

    }


    @Test(expected = Exception.class)
    public void testIndexAutoCreateDisabled() throws Exception {
        Properties properties = new TestSettings().getProperties();
        properties.setProperty(ConfigurationOptions.ES_INDEX_AUTO_CREATE, "false");

        // local file-system source
        Tap in = sourceTap();
        Tap out = new EsTap("cascading-local/non-existing", new Fields("name", "url", "picture"));
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

        Pipe pipe = new Pipe("copy");

        // rename "id" -> "garbage"
        pipe = new Each(pipe, new Identity(new Fields("garbage", "name", "url", "picture", "ts")));

        Properties props = new TestSettings().getProperties();
        props.setProperty("es.mapping.ttl", "<1>");
        build(props, in, out, pipe);
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

        assertThat(RestUtils.getMapping("cascading-local/fieldmapping").skipHeaders().toString(), is("fieldmapping=[name=STRING, picture=STRING, url=STRING]"));
    }

    @Test
    public void testIndexPattern() throws Exception {
        Properties properties = new TestSettings().getProperties();

        // local file-system source
        Tap in = sourceTap();
        Tap out = new EsTap("cascading-local/pattern-{id}", new Fields("id", "name", "url", "picture"));
        Pipe pipe = new Pipe("copy");
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

        assertThat(RestUtils.getMapping("cascading-local/pattern-12").skipHeaders().toString(), is("pattern-12=[id=STRING, name=STRING, picture=STRING, url=STRING]"));
    }

    @Test
    public void testIndexPatternWithFormatAndAlias() throws Exception {
        Properties properties = new TestSettings().getProperties();

        // local file-system source
        Tap in = sourceTap();
        Tap out = new EsTap("cascading-local/pattern-format-{ts:YYYY-MM-dd}", new Fields("id", "name", "url", "picture", "ts"));
        Pipe pipe = new Pipe("copy");
View Full Code Here

Examples of org.elasticsearch.hadoop.util.TestSettings

    @Test
    public void testUpdate() throws Exception {
        // local file-system source
        Tap in = sourceTap();
        Tap out = new EsTap("cascading-local/createwithid", new Fields("id", "name", "url", "picture"));
        Properties props = new TestSettings().getProperties();
        props.put(ConfigurationOptions.ES_MAPPING_ID, "id");

        Pipe pipe = new Pipe("copy");
        build(props, in, out, pipe);
    }
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.