Comece agoraComece grátis

Aba Storage do Spark UI

Uma pasta sherlock_parts existe no disco contendo doze arquivos de texto.

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

Ao carregar, isso cria um dataframe com sete partições.

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

Uma tabela é criada e a tabela é colocada em cache:

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

Spark UI Storage

Pergunta: O que vai aparecer na aba Storage do Spark UI assim que a operação de cache for acionada por uma ação?

Este exercicio faz parte do curso

Introdução ao Spark SQL em Python

Ver curso

exercicio interativo prático

Transforme teoria em prática com um dos nossos exercicio interativos

Iniciar exercicio