Spark-UI-Registerkarte Storage
Ein Ordner sherlock_parts liegt auf der Festplatte und enthält zwölf Textdateien.
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
Beim Laden entsteht ein DataFrame mit sieben Partitionen.
partitioned_df = spark.read.text('sherlock_parts')
partitioned_df.rdd.getNumPartitions()
7
Es wird eine Tabelle erstellt und diese Tabelle wird gecacht:
partitioned_df.createOrReplaceTempView('text')
spark.catalog.cacheTable('text')

Frage: Was erscheint in der Spark-UI-Registerkarte Storage, sobald der Cache-Vorgang durch eine Aktion ausgelöst wird?
Diese Übung ist Teil des Kurses
<Kurs>Einführung in Spark SQL mit Python</Kurs>Interaktive praktische Übung
Verwandle Theorie mit einer unserer interaktiven Übungen in die Praxis
Übung starten