{"id":1678,"date":"2014-11-26T01:23:58","date_gmt":"2014-11-26T09:23:58","guid":{"rendered":"http:\/\/blog.light42.com\/wordpress\/?p=1678"},"modified":"2014-12-09T19:19:21","modified_gmt":"2014-12-10T03:19:21","slug":"ampcamp-2014","status":"publish","type":"post","link":"http:\/\/blog.light42.com\/wordpress\/?p=1678","title":{"rendered":"AmpCamp 2014"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2014\/11\/apache_spark_logo_sm.png\" alt=\"spark_logo_sm\" class=\"alignright size-full\" \/><\/p>\n<h4><a href=\"https:\/\/amplab.cs.berkeley.edu\/software\/\" title=\"BDAS\" target=\"_blank\">BDAS<\/a>&nbsp; the Berkeley Data Analytics Stack<\/h4>\n<p>At a minimum, suffice it to say I participated online in roughly twelve hours of lecture and lab on Nov 20 and 21, 2014 at <strong><a href=\"http:\/\/ampcamp.berkeley.edu\/5\/\" title=\"AmpCamp 5\" target=\"_blank\">AmpCamp 5<\/a><\/strong> (I also attended one in Fall 2012). I put an emphasis on python, <a href=\"http:\/\/ipython.org\/notebook.html\" title=\"IPython Notebook\" target=\"_blank\">IPython Notebook<\/a>, and SQL.<\/p>\n<p>Once again this year, the camp mechanics went very smoothly &#8212; readable and succinct online <a href=\"http:\/\/ampcamp.berkeley.edu\/5\/exercises\/index.html\" title=\"labs\" target=\"_blank\">exercises<\/a>; Spark <a href=\"http:\/\/spark.apache.org\/docs\/latest\/\" title=\"docs\">docs<\/a>; Spark python, called <a href=\"http:\/\/spark.apache.org\/docs\/latest\/api\/python\/index.html\" title=\"pyspark\" target=\"_blank\">pyspark<\/a> is advancing, although some interfaces may not be available to python yet; Spark <a href=\"http:\/\/spark.apache.org\/docs\/latest\/sql-programming-guide.html\" title=\"Spark SQL\" target=\"_blank\">SQL<\/a> appears to be useable.<\/p>\n<p>To setup on my own Linux box, I unzipped the following files:<br \/>\n<code>ampcamp5-usb.zip  ampcamp-pipelines.zip  training-downloads.zip<\/code><\/p>\n<p>The resulting directories provided a pre-built Spark 1.1<br \/>\n<code>Using Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_65)<\/code><\/p>\n<p>The <a href=\"http:\/\/ampcamp.berkeley.edu\/5\/exercises\/index.html\" title=\"labs\" target=\"_blank\">Lab exercises<\/a> are almost all available as both Scala and python. Tools to do the first labs: <\/p>\n<pre>$SPARK_HOME\/bin\/spark-shell  $SPARK_HOME\/bin\/pyspark<\/pre>\n<p> and for extra practice <\/p>\n<pre>$SPARK_HOME\/bin\/spark-submit  $SPARK_HOME\/bin\/run-example<\/pre>\n<p><strong>IPython Notebook<\/strong><\/p>\n<p>An online teaching assistant (TA) suggested a command line to launch the Notebook &#8211; here are my notes:<br \/>\n<code><\/p>\n<p>##-- TA suggestion<br \/>\nIPYTHON_OPTS=\"notebook --pylab inline\" .\/bin\/pyspark --master \"local[4]\"<\/p>\n<p>##-- a server already setup with a Notebook, options<br \/>\n--matplotlib inline --ip=192.168.1.200 --no-browser --port=8888<\/p>\n<p>##-- COMBINE<br \/>\nIPYTHON_OPTS=\"notebook --matplotlib inline --ip=192.168.1.200 --no-browser --port=8888\"  $SPARK_HOME\/bin\/pyspark  --master \"local[4]\"<br \/>\n<\/code><\/p>\n<p>The IPython Notebook worked !  Lots of conveniences, interactivity and viz potential immediately available against the pyspark environment. I created several Notebooks in short order, to test and explore, for example <a href=\"http:\/\/ampcamp.berkeley.edu\/5\/exercises\/data-exploration-using-spark-sql.html\" title=\"Spark SQL\" target=\"_blank\">SQL<\/a>.<\/p>\n<p>The SQL exercise reads data from a format new to me, called <a href=\"http:\/\/parquet.incubator.apache.org\/documentation\/latest\/\" title=\"Parquet\" target=\"_blank\">Parquet<\/a><\/p>\n<p>&nbsp;<br \/>\n<strong>Part 1.2<\/strong><\/p>\n<p>After rest and recuperation, I wanted to try python in the almost-ready Spark 1.2 branch. It turned out to build and run easily. First get the spark code:<\/p>\n<pre> https:\/\/github.com\/apache\/spark\/tree\/branch-1.2<\/pre>\n<p>make sure <b>maven<\/b> is installed on your system, then run <\/p>\n<pre>.\/make-distribution.sh<\/pre>\n<p>. Afterwards, I set <code>$SPARK_HOME<\/code> to this directory, and launched IPython Notebook again. All the examples and experiments I had built worked without modification !  Success.<\/p>\n<p><strong>Other Links<\/strong><\/p>\n<p>http:\/\/databricks.com\/blog\/2014\/03\/26\/spark-sql-manipulating-structured-data-using-spark-2.html<br \/>\nhttp:\/\/spark-summit.org\/2014\/training<br \/>\nhttps:\/\/github.com\/amplab-extras<\/p>\n<p>http:\/\/www.planetscala.com\/<\/p>\n<p>experimental<br \/>\nhttps:\/\/github.com\/ooyala\/spark-jobserver<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BDAS&nbsp; the Berkeley Data Analytics Stack At a minimum, suffice it to say I participated online in roughly twelve hours of lecture and lab on Nov 20 and 21, 2014 at AmpCamp 5 (I also attended one in Fall 2012). I put an emphasis on python, IPython Notebook, and SQL. Once again this year, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1678"}],"collection":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1678"}],"version-history":[{"count":37,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1678\/revisions"}],"predecessor-version":[{"id":1717,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1678\/revisions\/1717"}],"wp:attachment":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1678"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}