Skip to content

Unable to Connect multiple Azure blob configured using same spark session #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nikhilindikuzha opened this issue Mar 13, 2025 · 4 comments

Comments

@nikhilindikuzha
Copy link

HI Team,

We have use case where we have created Apache iceberg table and its storage location is based on 2 azure blob storage One for hot layer and other for cold layer. We have used 2 s3 proxy end point for connecting to azure blob.

Problem: We are able to query the iceberg table if we have one s3 proxy which inturn connects to the azure blob. But we are not able pass 2 s3 points to the same spark session . Is there a way , we can achieve the same ?

@gaul
Copy link
Owner

gaul commented Mar 13, 2025

Can you be more specific about what you want to do? Do you want one S3Proxy endpoint to serve two different storage backends, mapping one bucket to the first backend and the second bucket to the second backend?

@nikhilindikuzha
Copy link
Author

nikhilindikuzha commented Mar 13, 2025

We have created an Iceberg table that initially contains four records. After a few days, due to retention policies, we need to move the first two records (i.e., the corresponding Parquet data files) to another storage layer (cold storage) in Azure Blob Storage. Once the data files are moved, the Iceberg metadata is updated accordingly. As a result, the table now references data files located in two different storage layers.

When executing a SELECT * FROM table, Spark should be able to access and query both storage layers seamlessly.

To facilitate this, we have set up two S3 proxy endpoints, each corresponding to a different storage system. However, in Spark, we can only set a single S3 endpoint per session using:

spark.conf.set("fs.s3a.endpoint", "")
spark.conf.set("fs.s3a.access.key", "")
spark.conf.set("fs.s3a.secret.key", "")
spark.conf.set("fs.s3a.aws.credential.provider", "org.apache.hadoop.fs.s3a.SimpleAWSCrednetialProvider")
spark.conf.set("fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem")

This limitation prevents us from querying both storage locations within the same Spark session.

Question:
How can we configure Spark to support multiple S3 proxy endpoints simultaneously, allowing seamless querying of data from both storage layers?

@gaul
Copy link
Owner

gaul commented Mar 13, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants