The Elasticsearch setup and configuration has been described in Chapter 3, Understanding and Tailing Data Streams, under DIY section. Apart from the configuration mentioned there, change the given property in elasticsearch.yml:
cluster.name: my-application
We learned how to write topology code in previous sections. Now, we will discuss the Elasticsearch bolt that reads the data from other bolts/spouts and writes into Elasticsearch. Perform the following steps:
- Add the following dependencies in pom.xml:
<!-- Need for JSON parsing --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.8.7</version> </dependency> <!-- Need for Elasticsearch java client API --> <dependency> ...