Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curran/scalatra-spark
A proof of concept integration serving Apache Spark services with Scalatra.
https://github.com/curran/scalatra-spark
Last synced: about 1 month ago
JSON representation
A proof of concept integration serving Apache Spark services with Scalatra.
- Host: GitHub
- URL: https://github.com/curran/scalatra-spark
- Owner: curran
- License: mit
- Created: 2015-02-22T19:58:00.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-26T19:51:51.000Z (almost 10 years ago)
- Last Synced: 2024-10-15T11:07:23.199Z (3 months ago)
- Language: JavaScript
- Size: 668 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scalatra-spark
An example project that demonstrates how to serve [Apache Spark](http://spark.apache.org/) services with [Scalatra](http://www.scalatra.org/).
The project was generated according to [Scalatra's Getting Started Guide](http://www.scalatra.org/2.4/getting-started/first-project.html), then minimal changes were made to integrate with Spark. Some effort was also required also to use [JSON4S](https://github.com/json4s/json4s) for parsing arguments and rendering results.
The interesting files are:
- [project/build.scala](https://github.com/curran/scalatra-spark/blob/master/data-reduction-server/project/build.scala) This has all the version stuff that needed to be finessed in order to integrate Spark and Scalatra.
- [DataReductionServlet.scala](https://github.com/curran/scalatra-spark/blob/master/data-reduction-server/src/main/scala/com/alpine/dataReductionServer/DataReductionServlet.scala) This is the part that defines a JSON REST API that invokes a Spark job.
- [main.js](https://github.com/curran/scalatra-spark/blob/master/data-reduction-server/src/main/webapp/main.js) This invokes the API using jQuery and prints the result to the console.See also [StackOverflow - Any examples of code integrating Scalatra with Spark](http://stackoverflow.com/questions/24965676/any-examples-of-code-integrating-scalatra-with-spark)
by Curran Kelleher Feb 2015