Spark UI-tabblad Storage
Er staat een map sherlock_parts op schijf met twaalf tekstbestanden.
ls sherlock_parts
sherlock_part0.txt sherlock_part2.txt sherlock_part7.txt
sherlock_part1.txt sherlock_part3.txt sherlock_part8.txt
sherlock_part10.txt sherlock_part4.txt sherlock_part9.txt
sherlock_part11.txt sherlock_part5.txt
sherlock_part12.txt sherlock_part6.txt
Bij het inladen levert dit een dataframe op met zeven partities.
partitioned_df = spark.read.text('sherlock_parts')
partitioned_df.rdd.getNumPartitions()
7
Er wordt een tabel gemaakt en de tabel wordt gecachet:
partitioned_df.createOrReplaceTempView('text')
spark.catalog.cacheTable('text')

Vraag: Wat verschijnt er op het tabblad Storage van de Spark UI zodra de cachebewerking door een actie wordt getriggerd?
Deze oefening maakt deel uit van de cursus
Introductie tot Spark SQL in Python
Praktische interactieve oefening
Zet theorie om in actie met een van onze interactieve oefeningen.
Begin met trainen