Skip to content

Help with Cloud Shuffle Storage Plugin for EMR 7.9.0 / Spark 3.5.5

0

Hi everyone,

I currently have an EMR cluster (emr-6.9.0) running a real-time ingestion process. To save disk space, I’ve been using the Cloud Shuffle Storage Plugin for Apache Spark. Now, I need to migrate my application to EMR 7.9.0, which comes with Spark 3.5.5, but I haven’t been able to find a plugin that supports shuffle operations on S3 for this version.

Does anyone know if there’s an updated plugin available or any alternative approach to enable shuffle on S3 with Spark 3.5.5?

Thanks in advance!

asked a year ago403 views

1 Answer
-1

The Cloud Shuffle Storage Plugin for Apache Spark allows storing shuffle data on cloud storage systems like Amazon S3, which helps supplement or replace local disk storage capacity for large shuffle operations. This is particularly useful for avoiding "No space left on device" errors in large jobs.

For your migration to EMR 7.9.0 with Spark 3.5.5, you have a few options:

  1. EMR Serverless with Shuffle-Optimized Disks: If you're considering EMR Serverless, you could use shuffle-optimized disks which offer higher IOPS and larger disk sizes. This is configured by setting parameters like spark.emr-serverless.executor.disk.type=shuffle_optimized in your Spark job configuration.

  2. AWS Glue Spark Shuffle Manager: Another alternative is to use the AWS Glue Spark shuffle manager, which allows storing shuffle data in Amazon S3. This can be enabled with job parameters:

  • --write-shuffle-files-to-s3 TRUE (main flag to use S3 for shuffle data)
  • --write-shuffle-spills-to-s3 TRUE (optional, for offloading spill files to S3)
  • --conf spark.shuffle.glue.s3ShuffleBucket=s3://<shuffle-bucket> (optional, to specify the S3 bucket)
  1. Custom Implementation: Based on the compatibility issues noted with newer Spark versions, you might need to implement a custom version of the plugin that's compatible with Spark 3.5.5. This could involve modifying the source code to add any missing method implementations.

It's worth noting that there have been compatibility issues reported when using the Cloud Shuffle Storage Plugin with newer Spark versions. Specifically, there was an issue with Spark 3.4 where the plugin didn't implement a necessary method (commitAllPartitions), resulting in errors. Since you're moving to an even newer version (3.5.5), you might encounter similar compatibility challenges.

Before proceeding with a full migration, I'd recommend testing your approach with a small-scale deployment to ensure compatibility with your specific workload and Spark version.
Sources
Cloud Shuffle Storage Plugin for Apache Spark - AWS Glue
S3 shuffle storage for EMR Serverless | AWS re:Post
Building a reliable data pipeline - AWS Glue Best Practices: Building a Secure and Reliable Data Pipeline
Using shuffle-optimized disks - Amazon EMR

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.