Home Big-data-and-business-intelligence Big Data Processing with Apache Spark

Big Data Processing with Apache Spark

By Manuel Ignacio Franco Galeano
books-svg-icon Book
Subscription
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
Subscription
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
About this book

Processing big data in real time is challenging due to scalability, information consistency, and fault-tolerance. This book teaches you how to use Spark to make your overall analytical workflow faster and more efficient. You'll explore all core concepts and tools within the Spark ecosystem, such as Spark Streaming, the Spark Streaming API, machine learning extension, and structured streaming.

You'll begin by learning data processing fundamentals using Resilient Distributed Datasets (RDDs), SQL, Datasets, and Dataframes APIs. After grasping these fundamentals, you'll move on to using Spark Streaming APIs to consume data in real time from TCP sockets, and integrate Amazon Web Services (AWS) for stream consumption.

By the end of this book, you’ll not only have understood how to use machine learning extensions and structured streams but you’ll also be able to apply Spark in your own upcoming big data projects.

Publication date:
October 2018
Publisher
Packt
Pages
142
ISBN
9781789808810

 

Big Data Processing with Apache Spark

Data Processing with Apache Spark

Copyright © 2018 Packt Publishing

All rights reserved. No part of this course may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this course to ensure the accuracy of the information presented. However, the information contained in this course is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this course.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this course by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Author: Manuel Franco

Reviewer: Amit Nandi

Managing Editor: Edwin Moses

Acquisitions Editor: Aditya Date

Production Editor: Nitesh Thakur

Editorial Board: David Barnes, Ewan Buckingham, Simon Cox, Manasa Kumar, Alex Mazonowicz, Douglas Paterson, Dominic Pereira, Shiny Poojary, Saman Siddiqui, Erol Staveley, Ankita Thakur, and Mohita Vyas

First Published: October 2018

Production Reference: 1311018

ISBN: 978-1-78980-881-0

Table of Contents

Preface

Introduction to Spark Distributed Processing

Introduction

Introduction to Spark and Resilient Distributed Datasets

Spark Components

Spark Deployment Modes

Spark Standalone

Apache Mesos

Other Deployment Options

Resilient Distributed Datasets

Python Shell and SparkContext

Parallelized Collections

RDD Creation from External Data Sources

Exercise 1: Basic Interactive Analysis with Python

Operations Supported by the RDD API

Map Transformations

Reduce Action

Working with Key-Value Pairs

Join Transformations

Set Operations

Exercise 2: Map Reduce Operations

Activity 1: Statistical Operations on Books

Self-Contained Python Spark Programs

Introduction to Functional Programming

Exercise 3: Standalone Python Programs

Introduction to SQL, Datasets, and DataFrames

Exercise 4: Downloading the Reduced Version of the movielens Dataset

Exercise 5: RDD Operations in DataFrame Objects

Summary

Introduction to Spark Streaming

Introduction

Introduction to Streaming Architectures

Back-Pressure, Write-Ahead Logging, and Checkpointing

Introduction to Discretized Streams

Consuming Streams from a TCP Socket

TCP Input DStream

Map-Reduce Operations over DStreams

Exercise 6: Building an Event TCP Server

Activity 2: Building a Simple TCP Spark Stream Consumer

Parallel Recovery of State with Checkpointing

Keeping the State in Streaming Applications

Join Operations

Exercise 7: TCP Stream Consumer from Multiple Sources

Activity 3: Consuming Event Data from Three TCP Servers

Windowing Operations

Exercise 8: Distributed Log Server

Introduction to Structured Streaming

Result Table and Output Modes in Structured Streaming

Exercise 9: Writing Random Ratings

Exercise 10: Structured Streaming

Summary

Spark Streaming Integration with AWS

Introduction

Spark Integration with AWS Services

Previous Requirements

AWS Kinesis Data Streams Basic Functionality

Integrating AWS Kinesis and Python

Exercise 11: Listing Existing Streams

Exercise 12: Creating a New Stream

Exercise 13: Deleting an Existing Stream

Exercise 14: Pushing Data to a Stream

AWS S3 Basic Functionality

Creating, Listing, and Deleting AWS S3 Buckets

Exercise 15: Listing Existing Buckets

Exercise 16: Creating a Bucket

Exercise 17: Deleting a Bucket

Kinesis Streams and Spark Streams

Activity 4: AWS and Spark Pipeline

Summary

Spark Streaming, ML, and Windowing Operations

Introduction

Spark Integration with Machine Learning

The MovieLens Dataset

Introduction to Recommendation Systems and Collaborative Filtering

Exercise 18: Collaborative Filtering and Spark

Exercise 19: Creating a TCP Server that Publishes User Ratings

Exercise 20: Spark Streams Integration with Machine Learning

Activity 5: Experimenting with Windowing Operations

Summary

Appendix A

About the Author
  • Manuel Ignacio Franco Galeano

    Manuel Ignacio Franco Galeano is a computer scientist from Colombia. He works for Fender Musical Instruments as a lead engineer in Dublin, Ireland. He holds a master's degree in computer science from University College, Dublin UCD. His areas of interest and research are music information retrieval, data analytics, distributed systems, and blockchain technologies.

    Browse publications by this author
Big Data Processing with Apache Spark
Unlock this book and the full library FREE for 7 days
Start now