Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentBuilder.field()


    Event event = EventBuilder.withBody(message.getBytes(charset));
    event.setHeaders(headers);

    XContentBuilder expected = jsonBuilder()
        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");
View Full Code Here


    event.setHeaders(headers);

    XContentBuilder expected = jsonBuilder()
        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");
View Full Code Here

    XContentBuilder expected = jsonBuilder()
        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
View Full Code Here

    XContentBuilder expected = jsonBuilder()
        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
View Full Code Here

        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
View Full Code Here

            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
                expected.field("host", "test@localhost");
View Full Code Here

            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
                expected.field("host", "test@localhost");
                expected.field("headerNameTwo", "headerValueTwo");
                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
View Full Code Here

            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
                expected.field("host", "test@localhost");
                expected.field("headerNameTwo", "headerValueTwo");
                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
                expected.field("type", "sometype");
View Full Code Here

            expected.field("@source_path", "/tmp/test");

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
                expected.field("host", "test@localhost");
                expected.field("headerNameTwo", "headerValueTwo");
                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
                expected.field("type", "sometype");
            expected.endObject();
View Full Code Here

            expected.startObject("@fields");
                expected.field("timestamp", String.valueOf(timestamp));
                expected.field("src_path", "/tmp/test");
                expected.field("host", "test@localhost");
                expected.field("headerNameTwo", "headerValueTwo");
                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
                expected.field("type", "sometype");
            expected.endObject();
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.