Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockerfile

FROM aether/ubuntu-spark:14.04-1.4.2-attributes
ADD target/spark-web-app.jar /spark-web-app.jar
ENTRYPOINT ["/bin/sh", "-c", "$SPARK_HOME/bin/spark-submit --class com.kmalik.sample.SparkWebApp spark-web-app.jar $*"]
Usage
sudo docker run --net=host -it kmalik/spark-web-app

Port : 8080

Spark endpoints :

GET /pi?points={points}&slices={slices} : compute value of pi, by looping over RDD of points (default 100000), split into slices (default 4)
Regular endpoints :

GET / : redirect to /status
GET /status : print running
GET /hello?name={name} : print 'Hello {name}'
POST /map?key={key}&value={value} : set key-value pair, print previous value for key if any
GET /map : print map
GET /map?key={key} : print value for key
DELETE /map : clear map, print
DELETE /map?key={key} : remove value for key, print
POST /exit : System.exit(1)
Source
https://github.com/kapil-malik/sample-apps/tree/master/spark-web-app

Docker Pull Command
Owner
saugupta