Giter Site home page Giter Site logo

spark-es's Introduction

Integrating Spark and Elasticsearch

The Elasticsearch for Apache Hadoop library lets you connect your Elasticsearch cluster with a Hadoop cluster or a cluster Apache Spark or Apache Storm. Reading and writing data to and from Elasticsearch using Spark is the focus of this guide. If you follow along, you will learn how to generate random data that can be read by Spark Streaming, how to push this data to Elasticsearch, and how to then use Spark to read the data back out. Welcome comments/questions!

Contents

  1. docker-compose.yml: this file sets up the appropriate docker containers for the project. These include a Spark node, an Elasticsearch node, and a Kibana node.
  2. Spark-ES.ipynb: this notebook runs the Spark code
  3. random_writer.ipynb: this notebook generates random data to stream into Spark

Running the Guide

First, run docker-compose up to spin up the Docker containers.

Next, in the Docker logs, you should see the URL and token for the Jupyter Notebook Server. It will look something like:

spark-node       |     Copy/paste this URL into your browser when you connect for the first time,
spark-node       |     to login with a token:
spark-node       |         http://localhost:8888/?token=6550c679badf9c9f823370381e5e941c691d8f7553e52efd

Now you can walk through the code in the notebooks. Make sure you run random_writer.ipynb before trying to stream data to Spark.

You can also check that data is written correctly to Elasticsearch using Kibana (accessible at localhost:5601.

spark-es's People

Contributors

brandomr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.