-
Notifications
You must be signed in to change notification settings - Fork 147
/
Copy path00_agenda-5-days-Apache-Spark-Advanced-for-Developers-1911.html
356 lines (318 loc) · 20.7 KB
/
00_agenda-5-days-Apache-Spark-Advanced-for-Developers-1911.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Apache Spark™ Advanced for Developers Workshop | 5 days</title>
<meta name="description" content="Apache Spark™ Advanced for Developers Workshop | 5 days">
<meta name="author" content="Jacek Laskowski">
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<link rel="stylesheet" href="reveal.js/css/theme/beige.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css">
<!-- Jacek: custom formatting -->
<link rel="stylesheet" href="revealjs-css/jacek.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'reveal.js/css/print/pdf.css' : 'reveal.js/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
</head>
<body>
<div class="reveal">
<div class="footer">
<footer style="font-size: small;">
© <a href="https://medium.com/@jaceklaskowski">Jacek Laskowski</a> 2019 / <a href="https://twitter.com/jaceklaskowski">@JacekLaskowski</a>
</footer>
</div>
<div class="slides">
<section class="intro" data-transition="zoom" id="home">
<p>
<img width="5%" style="background:none; border:none; box-shadow:none;" data-src="images/scala-logo.png">
<img width="17%" style="background:none; border:none; box-shadow:none;" data-src="images/spark-logo.png">
<img width="8%" src="images/jacek_laskowski_20141201_512px.png" style="border: 0">
</p>
<h1 style="font-size: 2.77em;">Apache Spark™<br>Advanced for Developers Workshop <small>5 Days</small></h1>
<h4 style="font-size: smaller;">
<a href="https://twitter.com/jaceklaskowski">@jaceklaskowski</a> / <a href="https://stackoverflow.com/users/1305344/jacek-laskowski">StackOverflow</a> / <a href="https://github.com/jaceklaskowski">GitHub</a>
<br>
The "Internals" Books: <a href="https://bit.ly/apache-spark-internals">Apache Spark</a> / <a href="https://bit.ly/spark-sql-internals">Spark SQL</a> / <a href="https://bit.ly/spark-structured-streaming">Spark Structured Streaming</a>
</h4>
</section>
<section>
<section id="speaker" style="font-size: 85%" data-markdown>
<textarea data-template>
<p><img width="12%" src="images/jacek_laskowski_20141201_512px.png" style="border: 0"></p>
* **Jacek Laskowski** is a freelance IT consultant
* Specializing in **Spark**, Kafka, Kafka Streams, Scala
* Development | Consulting | Training | Speaking
* 6 "The Internals Of" online books
* Among contributors to <a href="https://github.com/apache/spark/graphs/contributors">Apache Spark</a>
* Among <a href="https://www.confluent.io/nominate/">Confluent Community Catalyst</a> (Class of 2019 - 2020)
* Contact me at **[email protected]**
* Follow [@JacekLaskowski](https://twitter.com/jaceklaskowski) on twitter <br>for more #ApacheSpark, #ApacheKafka, #KafkaStreams #DeltaLake
</textarea>
</section>
<section id="gitbooks" style="font-size: 85%">
<p><img width="12%" src="images/jacek_laskowski_20141201_512px.png" style="border: 0"></p>
<div style="text-align: center">
<p>Jacek is best known by "The Internals Of" online books:</p>
<p>
<ol>
<li><a href="https://bit.ly/apache-spark-internals">The Internals of Apache Spark</a></li>
<li><a href="https://bit.ly/spark-sql-internals">The Internals of Spark SQL</a></li>
<li><a href="https://bit.ly/spark-structured-streaming">The Internals of Spark Structured Streaming</a></li>
<li><a href="https://bit.ly/kafka-streams-internals">The Internals of Kafka Streams</a></li>
<li><a href="https://bit.ly/apache-kafka-internals">The Internals of Apache Kafka</a></li>
<li><a href="https://delta.japila.pl/">The Internals of Delta Lake</a> «NEW»</li>
</ol>
</p>
</div>
</section>
<section id="stackoverflow">
<div style="text-align: center">
<p>
Jacek is active on <a href="http://stackoverflow.com/users/1305344/jacek-laskowski">StackOverflow</a>
</p>
<p>
<img width="60%" src="images/jaceklaskowski-stackoverflow-stats.png" style="border: 0">
</p>
</div>
</section>
</section>
<section>
<section id="goal" data-markdown>
<textarea data-template>
# Goal
<p>
Advance in solving analytical problems using<br />
<b><span style="font-size: 140%">Spark SQL</span></b><br />
and explore the recent Apache Spark 2.4.4, incl.<br />
<b><span style="font-size: 120%">Spark Structured Streaming</span></b>, <b><span style="font-size: 120%">Spark MLlib</span></b> and <b><span style="font-size: 140%">Delta Lake</span></b>
</p>
</textarea>
</section>
<section id="professional-objectives" style="font-size: 90%">
<h2>Professional Objectives</h2>
<ul>
<li>Advance in solving analytical problems using Spark SQL</li>
<li>Explore the recent features of Apache Spark 2.4</li>
<li>Deep dive into the internals of Apache Spark and the modules (Spark SQL, Spark Structured Streaming and Spark MLlib)</li>
<li>Understand performance tuning of Apache Spark applications and the advanced features of Apache Spark</li>
</ul>
</section>
<section id="training-content" style="font-size: 80%">
<h2>Training content</h2>
<ul>
<li>Anatomy of Spark Core Data Processing Platform</li>
<li>Foundations of Spark SQL</li>
<li>Internals of Structured Query Execution</li>
<li>Standard, User-Defined and User-Defined Aggregate Functions (Spark SQL)</li>
<li>Basic, Windowed and Multi-Dimensional Aggregations (Spark SQL)</li>
<li>Monitoring Spark Applications Using web UI and SparkListeners</li>
<li>Join Optimization with Bucketing (Spark SQL)</li>
<li>Stream Processing with Spark Structured Streaming</li>
<li>Machine Learning with Spark MLlib</li>
</ul>
</section>
</section>
<section>
<section id="agenda" data-markdown style="font-size: 90%;">
<textarea data-template>
## Agenda
1. [Day 1](#/day1) — The Essentials of Spark SQL
1. [Day 2](#/day2) — Spark SQL
1. [Day 3](#/day3) — Advanced Spark SQL
1. [Day 4](#/day4) — Spark Structured Streaming
1. [Day 5](#/day5) — Spark (All Modules)
</textarea>
</section>
<section id="day1" data-markdown style="font-size: 75%;">
<textarea data-template>
## Day 1 — The Essentials of Spark SQL
1. (Warm-up) [Exercise: Finding Ids of Rows with Word in Array Column](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Finding-Ids-of-Rows-with-Word-in-Array-Column.html)
1. [Spark SQL](spark-sql.html)
* [Exercise: Standalone Spark Application to Display Spark SQL Version](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Standalone-Spark-Application-to-Display-Spark-SQL-Version.html)
* [Exercise: Using CSV Data Source](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Using-CSV-Data-Source.html)
1. [Columns and Dataset Operators](spark-sql-columns-and-dataset-operators.html)
* [Exercise: Using Dataset.flatMap Operator](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Using-Dataset-flatMap-Operator.html)
* [Exercise: Difference in Days Between Dates As Strings](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Difference-in-Days-Between-Dates-As-Strings.html)
* [Exercise: Why are all fields null when querying with schema?](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Why-are-all-fields-null-when-querying-with-schema.html)
</textarea>
</section>
<section id="day2" data-markdown style="font-size: 80%;">
<textarea data-template>
## Day 2 — Spark SQL
1. [Standard and User-Defined Functions](spark-sql-standard-functions-udfs.html)
* [Exercise: How to add days (as values of a column) to date?](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/How-to-add-days-as-values-of-a-column-to-date.html)
1. [Basic Aggregation](spark-sql-basic-aggregation.html)
* [Exercise: Finding maximum values per group (groupBy)](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Finding-maximum-values-per-group-groupBy.html)
* [Exercise: Collect values per group](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Collect-values-per-group.html)
* [Exercise: Multiple Aggregations](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Multiple-Aggregations.html)
* [Exercise: Calculating aggregations](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Finding-maximum-value-agg.html)
1. [Joins](spark-sql-joins.html)
* [Exercise: Finding Most Populated Cities Per Country](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Finding-Most-Populated-Cities-Per-Country.html)
1. [The Internals of Structured Query Execution](spark-sql-internals-of-structured-query-execution.html)
1. Exercises
* [Exercise: Flattening Array Columns (From Datasets of Arrays to Datasets of Array Elements)](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Flattening-Array-Columns-From-Datasets-of-Arrays-to-Datasets-of-Array-Elements.html)
</textarea>
</section>
<section id="day3" data-markdown style="font-size: 75%;">
<textarea data-template>
## Day 3 — Advanced Spark SQL
1. Exercises
* [Exercise: Reverse-engineering Dataset.show Output](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Reverse-engineering-Dataset-show-Output.html)
* [Exercise: Using pivot for Cost Average and Collecting Values](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Using-pivot-for-Cost-Average-and-Collecting-Values.html)
1. [Windowed Aggregation](spark-sql-windowed-aggregation.html)
* [Exercise: Finding 1st and 2nd Bestsellers Per Genre](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Finding-1st-and-2nd-Bestsellers-Per-Genre.html)
* [Exercise: Calculating Gap Between Current And Highest Salaries Per Department](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Calculating-Gap-Between-Current-And-Highest-Salaries-Per-Department.html)
* [Exercise: Calculating Running Total / Cumulative Sum](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Calculating-Running-Total-Cumulative-Sum.html)
* [Exercise: Calculating Difference Between Consecutive Rows Per Window](https://jaceklaskowski.github.io/spark-workshop/exercises/sql/Calculating-Difference-Between-Consecutive-Rows-Per-Window.html)
1. [Multi-Dimensional Aggregation](spark-sql-multi-dimensional-aggregation.html)
* [Exercise: Using rollup Operator for Total and Average Salaries by Department and Company-Wide](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Using-rollup-Operator-for-Total-and-Average-Salaries-by-Department-and-Company-Wide.html)
1. [Developing Custom Data Source](spark-sql-Developing-Custom-Data-Source.html)
</textarea>
</section>
<section id="day4" data-markdown style="font-size: 75%;">
<textarea data-template>
## Day 4 — Spark Structured Streaming
1. [Exercise: Developing Custom Data Source](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Developing-Custom-Data-Source.html)
1. [Spark Structured Streaming](spark-structured-streaming.html)
* [Exercise: Your First Standalone Structured Streaming Application](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Your-First-Standalone-Structured-Streaming-Application.html)
* [Exercise: Streaming CSV Datasets](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Streaming-CSV-Datasets.html)
* [Exercise: Stateless Streaming Aggregation](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Streaming-Aggregation-with-groupBy.html)
1. Spark Structured Streaming / Kafka Data Source
* [The Essentials of Apache Kafka™](https://jaceklaskowski.github.io/kafka-workshop/slides/apache-kafka-essentials.html)
* [Exercise: Using Kafka Data Source](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Using-Kafka-Data-Source.html)
</textarea>
</section>
<section id="day5" data-markdown style="font-size: 75%;">
<textarea data-template>
## Day 5 — Spark (All Modules)
1. Spark Structured Streaming / Exercises
* [Exercise: Using foreach Operator (and ForeachWriter)](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Using-foreach-Operator-and-ForeachWriter.html)
* [Exercise: Executing SQL Statements from Kafka](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Executing-SQL-Statements-from-Kafka.html)
* [Exercise: Writing Selected Columns to Kafka](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-structured-streaming-exercise-Writing-Selected-Columns-to-Kafka.html)
1. Spark MLlib
1. [Machine Learning with Spark MLlib](spark-mllib.html)
1. [ML Pipelines](spark-mllib-ml-pipelines.html)
1. [Exercise: Email Classification](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-mllib-exercise-Email-Classification.html)
1. [web UI](spark-core-webui.html)
1. Spark SQL / Exercises
1. [Exercise: Generating Exam Assessment Report](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Generating-Exam-Assessment-Report.html)
1. [Exercise: Finding Longest Sequence](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Finding-Longest-Sequence.html)
1. [Exercise: Calculating percent rank](https://jaceklaskowski.github.io/spark-workshop/exercises/spark-sql-exercise-Calculating-percent-rank.html)
</textarea>
</section>
</section>
<section>
<section id="prerequisities">
<h1>Prerequisities</h1>
<h4>Be prepared to get the most out of the workshop</h4>
</section>
<section id="prerequisities-experience">
<h2>Prerequisities / Experience</h2>
<ol>
<li>Hands-on programming experience using Scala</li>
<li>Experience developing Spark applications</li>
</ol>
</section>
<section id="prerequisities-to-be-installed">
<h2>Prerequisities / To Be Installed</h2>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Java Platform, Standard Edition (Java SE) 8</a></li>
<li><a href="http://spark.apache.org/downloads.html">Apache Spark</a></li>
<li><a href="https://www.jetbrains.com/idea/download/">IntelliJ IDEA</a> Community Edition with <b>Scala plugin</b></li>
<li><a href="http://www.scala-sbt.org/download.html">sbt</a></li>
<li><a href="http://kafka.apache.org/downloads">Apache Kafka</a></li>
<li>Linux or macOS preferred
<ul>
<li>Consult <a href="https://books.japila.pl/apache-spark-internals/apache-spark-internals/2.4.4/spark-tips-and-tricks-running-spark-windows.html">Running Spark Applications on Windows</a> when on MS Windows</li>
</ul>
</li>
</ul>
</section>
</section>
<section>
<section id="in-da-clazz">
<h1>In-Class Preparations</h1>
<h4>Make Instructor's Life Slightly Easier. Thanks!</h4>
</section>
<section id="introduce-yourself">
<h2>Introduce Yourself</h2>
<ol>
<li>First name</li>
<li>What's your experience with Spark?</li>
<li>Any production experience with Spark?</li>
<li>What do you expect from the workshop?</li>
<li>Where do you want to be with Spark after 5 days?</li>
</ol>
</section>
<section id="addendum">
<h2>Addendum</h2>
<ol>
<li>Put your name on paper in front of you
<ul>
<li>Stick to your laptop if possible</li>
<li>Use LARGE fonts</li>
</ul>
</li>
<li>1-hour lunch break at <b>12:45pm</b></li>
</ol>
</section>
</section>
<section style="text-align: left" data-markdown id="questions">
<textarea data-template>
# Questions?
* Read [The Internals of Apache Spark](https://bit.ly/apache-spark-internals)
* Read [The Internals of Spark SQL](https://bit.ly/spark-sql-internals)
* Read [The Internals of Spark Structured Streaming](https://bit.ly/spark-structured-streaming)
* Follow [@jaceklaskowski](https://twitter.com/jaceklaskowski) on twitter
* Upvote [my questions and answers on StackOverflow](http://stackoverflow.com/users/1305344/jacek-laskowski)
</textarea>
</section>
</div>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
slideNumber: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
menu: {
markers: true,
openSlideNumber: true
},
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function () { return !document.body.classList; } },
{ src: 'reveal.js/plugin/markdown/marked.js' },
{ src: 'reveal.js/plugin/markdown/markdown.js' },
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal.js/plugin/notes/notes.js', async: true },
{ src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function () { hljs.initHighlightingOnLoad(); } }
]
});
</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-45999426-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>