Guest User

Untitled

a guest
Oct 17th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Elasticsearch client is not connected to any Elasticsearch nodes!
  2.  
  3. docker run --rm -d -p 9200:9200 -p 9300:9300 -p 5601:5601 --name es-kibana nshou/elasticsearch-kibana
  4.  
  5. List<InetSocketAddress> transports = new ArrayList<>();
  6. transports.add(new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 9300));
  7.  
  8. tweets.addSink(new ElasticsearchSink<Tuple2<String, Integer>>(
  9. config,
  10. transports,
  11. new ESSink()));
  12.  
  13. curl --request PUT --url http://localhost:9200/twitter-bd
  14.  
  15. curl --request PUT
  16. --url http://localhost:9200/twitter-bd/_mapping/twitter-wordcount
  17. --header 'content-type: application/json'
  18. --data '{
  19. "twitter-wordcount": {
  20. "properties": {
  21. "word": {"type": "string"},
  22. "cnt": {"type": "integer"}
  23. }
  24. }
  25. }'
Add Comment
Please, Sign In to add comment