use of org.graylog2.indexer.indices.IndicesAdapter in project graylog2-server by Graylog2.
the class IndicesIT method indicesAdapter.
protected IndicesAdapter indicesAdapter() {
if (elasticsearch().searchServer().equals(SearchServer.ES6)) {
return new IndicesAdapterES6(jestClient(elasticsearch()), new ObjectMapperProvider().get(), new IndexingHelper());
} else {
final ObjectMapper objectMapper = new ObjectMapperProvider().get();
final ElasticsearchClient client = elasticsearchClient();
return new IndicesAdapterES7(client, new StatsApi(objectMapper, client), new CatApi(objectMapper, client), new ClusterStateApi(objectMapper, client));
}
}
use of org.graylog2.indexer.indices.IndicesAdapter in project graylog2-server by Graylog2.
the class IndicesGetAllMessageFieldsIT method setUp.
@Before
public void setUp() throws Exception {
final Node node = new Node(mock(NodeAdapter.class));
// noinspection UnstableApiUsage
indices = new Indices(new IndexMappingFactory(node, ImmutableMap.of(MESSAGE_TEMPLATE_TYPE, new MessageIndexTemplateProvider())), mock(NodeId.class), new NullAuditEventSender(), new EventBus(), indicesAdapter());
}
use of org.graylog2.indexer.indices.IndicesAdapter in project graylog2-server by Graylog2.
the class IndicesIT method setUp.
@BeforeEach
public void setUp() {
// noinspection UnstableApiUsage
eventBus = new EventBus("indices-test");
final Node node = new Node(createNodeAdapter());
final IndexMappingFactory indexMappingFactory = new IndexMappingFactory(node, ImmutableMap.of(MessageIndexTemplateProvider.MESSAGE_TEMPLATE_TYPE, new MessageIndexTemplateProvider()));
indices = new Indices(indexMappingFactory, mock(NodeId.class), new NullAuditEventSender(), eventBus, indicesAdapter());
}
Aggregations