Coder Social home page Coder Social logo

spark_training's Introduction

spark.trainer

A copy of code used at Spark Summit for training

#Code Examples

This project is pretty much a bunch of examples for training.

Nesting Examples

Here are a number of examples of using nesting with RDD, DataFrames, and DataSets.

  • src/main/scala/com/malaska/spark/training/nested/

Customer Partitioning

Here is an example of building a custom partition

  • /src/main/scala/com/malaska/spark/training/partitioning/

Windowing

Windowing is both a complex topic and one that show cases the idea of the Big and the Small.

  • /src/main/scala/com/malaska/spark/training/windowing/

Spark Streaming Demo Notes

Single batch counting

Run program

CountingInAStreamExpBatchCounting localhost 9999 ./checkpoint

Send it messages

nc -lk 9999
hi there
hi bob

Live time counting

Run program

CountingInAStreamExpUpdateStateByKey localhost 9999 ./checkpoint

Send it messages

nc -lk 9999
hi there
hi bob

Structured Streaming session counting

Run program

CountingInAStreamExpGroupBy localhost 9999

Send it messages

nc -lk 9999
hi there
hi bob

Structured Streaming session counting Dataset

Run program

CountingInAStreamDatasetExpGroupBy localhost 9999

Send it messages

nc -lk 9999
bob,tim,FB,10,123
bob,tim,FB,11,124
bob,tim,FB,10,125
tim,cat,G,20,124
tim,cat,G,20,125
tim,cat,G,20,126
hi bob

spark_training's People

Contributors

tedbear42 avatar

Watchers

James Cloos avatar Jenny 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.