Coder Social home page Coder Social logo

tanbinh123 / spark_spring_project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saaakeeer/spark_spring_project

0.0 0.0 0.0 566 KB

use Java spark and springboot to integrata data after cleaning it and display different chart for it

Java 100.00%

spark_spring_project's Introduction

Dependency Injection of SparkSession: Apache Spark on/with support of Spring boot

spark-spring.jpg

  • A Web Application of Apache Spark using Spring Boot MVC
  • Spring is a very popular Java-based framework for building web and enterprise applications.
  • Spring framework provides flexibility to configure beans/objects in multiple ways such as XML, Annotations, and JavaConfig.
  • Spring’s dependency injection approach encourages writing testable code
  • Spring Boot is basically an extension of the Spring framework which eliminated the boilerplate configurations required for setting up a Spring application.
  • Apache Spark is an open-source distributed general-purpose cluster-computing framework.

Mixing Spring & Spark - Steps

  1. Create a Maven-Based Spring Boot Project
  2. Add the required dependencies in pom.xml
  3. Configure Spark Properties in application.properties
  4. Adding the Spark ApplicationConfig: declaring the JavaSparkContext and SparkConf as beans (using @Bean annotation) this tell the spring container to manage them for us
  5. Creating a service/controller for Read Csv & Register a REST Controller with an endpoint
  6. Run the application, Test your application from a REST client or on Browser Url: http://localhost:8080/spark-context/read-csv

That's it, Spark now returns output on an Enterprise web application!

spark_spring_project's People

Contributors

saaakeeer 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.