Giter Club home page Giter Club logo

sparkforspring's Introduction

SparkForSpring

This is a somewhat cleaned up version of the code I presented at SpringOne2014 to show how Spark can be used in Spring apps. It's based on an app I'm writing to do real time and processing of a data stream coming from a high powered model rocket. The goal of this sample is Spring and Spark, so most of the rocket code was eliminated.

What is left is a somewhat generic Spring Boot application. The app will run with a webui for local experimentation, or as a standalone app for running on a cluster. The behavior is controlled by the spring.profiles.active property. For running in eclipse/STS I typically use the webui, and the local data files in the project. (The default is to use HDFS.)

In the run profile pass these parameters --spring.profiles.active=webui --file.directory=src/main/resources/data/

For a simple run profile that just processes one of the data files pass --file.directory=src/main/resources/data/ --flight.id=1 (or 0)

Deploy Spark Cluster

I have not tested the app deployed to a cluster yet. The sparkjar task that created the "UberJar", is still including the spark and hadoop clients. After I get that fixed, I'll test it and deploy a version that's been tested on a cluster.

sparkforspring's People

Contributors

sdeeg-pivotal 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.