Package org.elasticsearch.common.xcontent

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


                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();

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);
   
View Full Code Here


                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
                expected.field("type", "sometype");
            expected.endObject();

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);
   
    JsonParser parser = new JsonParser();
    assertEquals(parser.parse(expected.string()),parser.parse(actual.string()));
View Full Code Here

                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();

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);
View Full Code Here

                expected.field("source", "flume_tail_src");
                expected.field("headerNameOne", "headerValueOne");
                expected.field("type", "sometype");
            expected.endObject();

        expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);

    JsonParser parser = new JsonParser();
    assertEquals(parser.parse(expected.string()),parser.parse(actual.string()));
View Full Code Here

    expected.field("body", new String(message.getBytes(), charset));
    for (String headerName : headers.keySet()) {
      expected.field(headerName, new String(headers.get(headerName).getBytes(),
          charset));
    }
    expected.endObject();

    XContentBuilder actual = fixture.getContentBuilder(event);

    assertEquals(new String(expected.bytes().array()), new String(actual
        .bytes().array()));
View Full Code Here

                for (String s : page.getLinks()) {
                    builder.value(s);
                }
                builder.endArray();

                builder.endObject();

                if (closed) {
                    logger.warn("river was closing while processing wikipedia page [{}]/[{}]. Operation skipped.",
                            page.getID(), page.getTitle());
                    return;
View Full Code Here

    builder.field("state", closed ? "stopped" : "running");
    if (!closed)
      builder.field("last_restart", lastRestartDate);
    else if (permanentStopDate != null)
      builder.field("stopped_permanently", permanentStopDate);
    builder.endObject();
    if (esNode != null) {
      builder.startObject("node");
      builder.field("id", esNode.getId());
      builder.field("name", esNode.getName());
      builder.endObject();
View Full Code Here

    builder.endObject();
    if (esNode != null) {
      builder.startObject("node");
      builder.field("id", esNode.getId());
      builder.field("name", esNode.getName());
      builder.endObject();
    }
    if (coordinatorInstance != null) {
      List<SpaceIndexingInfo> currProjectIndexingInfo = coordinatorInstance.getCurrentSpaceIndexingInfo();
      if (currProjectIndexingInfo != null) {
        builder.startArray("current_indexing");
View Full Code Here

        SpaceIndexingInfo lastIndexing = getLastSpaceIndexingInfo(spaceKey);
        if (lastIndexing != null) {
          builder.field("last_indexing");
          lastIndexing.buildDocument(builder, false, true);
        }
        builder.endObject();
      }
      builder.endArray();
    }
    builder.endObject();
    return builder.string();
View Full Code Here

        }
        builder.endObject();
      }
      builder.endArray();
    }
    builder.endObject();
    return builder.string();
  }

  /**
   * @param spaceKey to get info for
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.