Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

1 Billion Rows Challenge with the Memory API - JEP Cafe 25

Java via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to tackle the famous 1 Billion Rows Challenge using Java's Memory API introduced in JDK 22 in this 31-minute JEP Café episode. Discover how to process binary data efficiently using standard JDK patterns while exploring the comprehensive Memory API ecosystem. Master the selection and implementation of different Arena types including global, auto, shared, and confined Arenas for memory management. Explore Memory Segment creation techniques for mapping multi-gigabyte files to off-heap memory and working with heap-based segments through arrays and slicing operations. Understand MemoryLayout design principles for structured data description, including primitive element alignment and padding strategies. Develop proficiency with VarHandle creation from MemoryLayouts for efficient data access and manipulation. Practice reading and writing data using the integrated approach of arenas, memory segments, and var handles while learning to work with arrays using specialized var handles. Optimize performance by avoiding boxing and unboxing operations through VarHandles and exact invocation techniques. Implement file mapping to off-heap memory segments for large-scale data processing and utilize the Stream API for efficient data reading from test files containing billions of rows. Complete the challenge by running comprehensive benchmarks to measure performance results using clean, standard patterns applicable to real-world applications.

Syllabus

Intro
Writing and reading to the off-heap memory
Getting the global Arena, and creating an auto Arena
Creating and closing shared and confined Arenas
Using Arenas to allocate Memory Segments
Creating heap Memory Segments on arrays or by slicing other Memory Segments
Creating Memory Layouts
Aligning primitive elements with padding
Creating VarHandles from MemoryLayouts
Writing and reading data using arenas, memory segments, and var handles
Writing and reading arrays using specific var handles
Avoiding boxing and un boxing with VarHandles and exact invocation
Mapping files to off-heap memory segments
Creating the test file with 1 billion rows
Reading the data from the test file with the Stream API
Running the final benchmark and getting the result
That's it for today, talk to you soon!

Taught by

Java

Reviews

Start your review of 1 Billion Rows Challenge with the Memory API - JEP Cafe 25

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.