A Simple Application in Spark and Scala


In this blog, we will see how to build a Simple Application in Spark & Scala using sbt.

Spark is a Map-Reduce like cluster computing framework, designed to make data analytics fast.

In this application we will count the number of lines containing “the”. To build this application we are going to use Spark 0.9.1, Scala 2.10.3 & sbt 0.13.0.

Before start building this application follow these instructions :-

1). Download Spark 0.9.1.

2). Unzip the binary package in any directory.

3). Go to the Spark directory.

4) Run ./sbt/sbt assembly

To successfully build Spark with sbt we need sbt 0.13.0 or later versions already installed in system.

After building Spark, we can start building the Application.

To build the Application follow these steps:

1). Run mkdir SimpleSparkProject.

2). Create a .sbt file in SimpleSparkProject/simple.sbt

3). Create a file SimpleSparkProject/src/main/scala/SimpleApp.scala

4). Then go to SimpleSparkProject directory.


View original post 16 more words


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s