Search in sources :

Example 1 with SimpleMessage

use of org.graylog.plugins.views.search.export.SimpleMessage in project graylog2-server by Graylog2.

the class ElasticsearchExportBackendITBase method collectTotalResult.

private SimpleMessageChunk collectTotalResult(ExportMessagesCommand command) {
    LinkedHashSet<SimpleMessageChunk> allChunks = collectChunksFor(command);
    LinkedHashSet<SimpleMessage> allMessages = new LinkedHashSet<>();
    for (SimpleMessageChunk chunk : allChunks) {
        keepOnlyRelevantFields(chunk, command.fieldsInOrder());
        allMessages.addAll(chunk.messages());
    }
    return SimpleMessageChunk.from(command.fieldsInOrder(), allMessages);
}
Also used : SimpleMessageChunk(org.graylog.plugins.views.search.export.SimpleMessageChunk) LinkedHashSet(java.util.LinkedHashSet) SimpleMessage(org.graylog.plugins.views.search.export.SimpleMessage)

Example 2 with SimpleMessage

use of org.graylog.plugins.views.search.export.SimpleMessage in project graylog2-server by Graylog2.

the class ElasticsearchExportBackendIT method collectTotalResult.

private SimpleMessageChunk collectTotalResult(ExportMessagesCommand command) {
    LinkedHashSet<SimpleMessageChunk> allChunks = collectChunksFor(command);
    LinkedHashSet<SimpleMessage> allMessages = new LinkedHashSet<>();
    for (SimpleMessageChunk chunk : allChunks) {
        keepOnlyRelevantFields(chunk, command.fieldsInOrder());
        allMessages.addAll(chunk.messages());
    }
    return SimpleMessageChunk.from(command.fieldsInOrder(), allMessages);
}
Also used : SimpleMessageChunk(org.graylog.plugins.views.search.export.SimpleMessageChunk) LinkedHashSet(java.util.LinkedHashSet) SimpleMessage(org.graylog.plugins.views.search.export.SimpleMessage)

Aggregations

LinkedHashSet (java.util.LinkedHashSet)2 SimpleMessage (org.graylog.plugins.views.search.export.SimpleMessage)2 SimpleMessageChunk (org.graylog.plugins.views.search.export.SimpleMessageChunk)2