Giter Site home page Giter Site logo

scala-spark-example's Introduction

scala-spark-example

Example Spark application to count word occurrences in the provided file located on HDFS

Application structure

Building

In this version the application is packaged into jar using standard sbt package command, which will produce a jar containing only application specific classes - this is fine in situation when the application uses only libraries provided by either Spark or Hadoop.

In situation when other libraries might be used, the sbt-assembly plugin is included - in this case, application needs to be packaged into fat jar using plugin's assembly command - also, this jar will then need to be put on HDFS and provided to Spark to be run. Care needs to be taken in sbt dependency configuration to mark all libraries already available within Spark or Hadoop as provided, so they will not be unnecessarily included withing fat jar.

Functionality

The application reads file provided as parameter and located on HDFS, and then count words in it and outputs the words and their counts in an alphabetically sorted way to the output file.

Note

  • 0.0.0.0 has to be passed as value for spark.driver.bindAddress configuration parameter from the application

Links

scala-spark-example's People

Contributors

krzsam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.