From 6c7e7b5239da5eacd1b0f589ac268ba54f74631a Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Tue, 3 Mar 2015 10:32:59 -0500 Subject: [PATCH] Added Spark IPython Notebook, currently contains snippets for starting the pyspark shell and viewing the spark context. --- README.md | 1 + spark/spark.ipynb | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 spark/spark.ipynb diff --git a/README.md b/README.md index 4b8315c..7694f98 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ IPython Notebooks demonstrating Amazon Web Services functionality. IPython Notebooks demonstrating spark and HDFS functionality. * [hdfs](http://nbviewer.ipython.org/github/donnemartin/ipython-data-notebooks/blob/master/spark/hdfs.ipynb) +* [spark](http://nbviewer.ipython.org/github/donnemartin/ipython-data-notebooks/blob/master/spark/spark.ipynb) ## commands diff --git a/spark/spark.ipynb b/spark/spark.ipynb new file mode 100644 index 0000000..7ef6543 --- /dev/null +++ b/spark/spark.ipynb @@ -0,0 +1,65 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:91816797cb89d9542e7443d05f797ce60e70a74be3a870823401ce7b3e7c3313" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Spark\n", + "\n", + "* Python Shell" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Python Shell" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the pyspark shell:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "pyspark" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "View the spark context:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "sc" + ], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file