CommencezCommencez gratuitement

Onglet Storage de la Spark UI

Un dossier sherlock_parts existe sur le disque et contient douze fichiers texte.

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

Lors du chargement, cela crée un dataframe ayant sept partitions.

partitioned_df = spark.read.text('sherlock_parts')
partitioned_df.rdd.getNumPartitions()
7

Une table est créée, puis mise en cache :

partitioned_df.createOrReplaceTempView('text')
spark.catalog.cacheTable('text')

Spark UI Storage

Question : Qu'est-ce qui apparaîtra dans l'onglet Storage de la Spark UI une fois que l'opération de mise en cache sera déclenchée par une action ?

Cette activité fait partie du cours

Introduction à Spark SQL en Python

Voir le cours

Exercice interactif pratique

Passez de la théorie à l’action grâce à l’un de nos exercices interactifs

Commencer l’exercice