You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "and124578963 (via GitHub)" <gi...@apache.org> on 2025/05/28 16:46:40 UTC

[I] S3 client for storage path not available [iceberg]

and124578963 opened a new issue, #13174:
URL: https://github.com/apache/iceberg/issues/13174

   ### Apache Iceberg version
   
   main (development)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Hey! I had a problem with the commit https://github.com/apache/iceberg/pull/12799#issuecomment-2913084781
   Spark 3.5_2.12 with jupyter-notebook.
    
   When I add these props for enabling S3FileIO, problem appears:
   ``` 
     spark.sql.defaultCatalog: iceberg
     spark.sql.catalog.iceberg.io-impl: org.apache.iceberg.aws.s3.S3FileIO
     spark.sql.catalog.iceberg.s3.endpoint: http://...
     spark.sql.catalog.iceberg.client.credentials-provider: software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider  
     spark.executorEnv.AWS_ENDPOINT: ${env:AWS_ENDPOINT}
     spark.executorEnv.AWS_ACCESS_KEY_ID: ${env:AWS_ACCESS_KEY_ID}
     spark.executorEnv.AWS_SECRET_ACCESS_KEY: ${env:AWS_SECRET_ACCESS_KEY}
     spark.executorEnv.AWS_REGION: ${env:AWS_REGION}
     spark.executorEnv.AWS_DEFAULT_REGION: ${env:AWS_DEFAULT_REGION}
     spark.serializer: org.apache.spark.serializer.KryoSerializer
   ```
   
   StackTrace:
   ```
   25/05/28 19:34:40 ERROR org.apache.spark.executor.Executor: Exception in task 7.0 in stage 1.0 (TID 8)
   java.lang.IllegalStateException: [BUG] S3 client for storage path not available: s3a://spark-nt/load_test_delete_warehouse/gen_transaction_icb_month/data/TRANSACTION_DATE_month=2010-06/00000-0-ac46d814-2605-4a4c-9dae-74d4a22f072a-00135.parquet
   	at org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkState(Preconditions.java:603) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.aws.s3.S3FileIO.clientForStoragePath(S3FileIO.java:427) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.aws.s3.S3FileIO.newInputFile(S3FileIO.java:184) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.encryption.EncryptingFileIO.wrap(EncryptingFileIO.java:150) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.relocated.com.google.common.collect.Iterators$6.transform(Iterators.java:828) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.relocated.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:51) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.relocated.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:51) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.encryption.EncryptingFileIO.bulkDecrypt(EncryptingFileIO.java:63) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.spark.source.BaseReader.inputFiles(BaseReader.java:177) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.spark.source.BaseReader.getInputFile(BaseReader.java:170) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.spark.source.BatchDataReader.open(BatchDataReader.java:100) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.spark.source.BatchDataReader.open(BatchDataReader.java:43) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.iceberg.spark.source.BaseReader.next(BaseReader.java:134) ~[iceberg-spark-runtime-3.5_2.12-apache-main-raw.jar:?]
   	at org.apache.spark.sql.execution.datasources.v2.PartitionIterator.hasNext(DataSourceRDD.scala:120) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.datasources.v2.MetricsIterator.hasNext(DataSourceRDD.scala:158) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceRDD$$anon$1.$anonfun$hasNext$1(DataSourceRDD.scala:63) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceRDD$$anon$1.$anonfun$hasNext$1$adapted(DataSourceRDD.scala:63) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at scala.Option.exists(Option.scala:376) ~[scala-library-2.12.18.jar:?]
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceRDD$$anon$1.hasNext(DataSourceRDD.scala:63) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceRDD$$anon$1.advanceToNextIter(DataSourceRDD.scala:97) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceRDD$$anon$1.hasNext(DataSourceRDD.scala:63) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460) ~[scala-library-2.12.18.jar:?]
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.columnartorow_nextBatch_0$(Unknown Source) ~[?:?]
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source) ~[?:?]
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.sql.execution.WholeStageCodegenEvaluatorFactory$WholeStageCodegenPartitionEvaluator$$anon$1.hasNext(WholeStageCodegenEvaluatorFactory.scala:43) ~[spark-sql_2.12-3.5.4.jar:3.5.4]
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460) ~[scala-library-2.12.18.jar:?]
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460) ~[scala-library-2.12.18.jar:?]
   	at org.apache.spark.util.random.SamplingUtils$.reservoirSampleAndCount(SamplingUtils.scala:41) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.RangePartitioner$.$anonfun$sketch$1(Partitioner.scala:322) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.RangePartitioner$.$anonfun$sketch$1$adapted(Partitioner.scala:320) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsWithIndex$2(RDD.scala:910) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.rdd.RDD.$anonfun$mapPartitionsWithIndex$2$adapted(RDD.scala:910) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:367) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:331) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.scheduler.Task.run(Task.scala:141) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally(SparkErrorUtils.scala:64) ~[spark-common-utils_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally$(SparkErrorUtils.scala:61) ~[spark-common-utils_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:94) ~[spark-core_2.12-3.5.4.jar:3.5.4]
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:623) [spark-core_2.12-3.5.4.jar:3.5.4]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
   	at java.lang.Thread.run(Thread.java:840) [?:?]
   ```
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [x] I cannot contribute a fix for this bug at this time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "vanshb03 (via GitHub)" <gi...@apache.org>.
vanshb03 commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-2920767191

   Hey @and124578963 ,
   
   To fix this S3FileIO issue, add the missing catalog implementation:
   
   ```
   spark.sql.catalog.iceberg.catalog-impl=org.apache.iceberg.spark.SparkCatalog
   ```
   
   Also, change your S3A paths from `s3a://` to `s3://` in your data locations. S3FileIO doesn't support the `s3a://` scheme - it only works with `s3://`.
   
   The error occurs because S3FileIO can't find a registered client for the `s3a://` storage path.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra closed issue #13174: S3 client for storage path not available
URL: https://github.com/apache/iceberg/issues/13174


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "hemanthboyina (via GitHub)" <gi...@apache.org>.
hemanthboyina commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-2921921245

   s3a:// might not be the problem over here. As by default for ROOT_PREFIX="s3" we have a PrefixedS3Client added in Map, even though your storage path doesn't match, the default s3 client should be returned rather than throwing null.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-2929951166

   > Hey [@and124578963](https://github.com/and124578963) ,
   > 
   > To fix this S3FileIO issue, add the missing catalog implementation:
   > 
   > ```
   > spark.sql.catalog.iceberg.catalog-impl=org.apache.iceberg.spark.SparkCatalog
   > ```
   > 
   > Also, change your S3A paths from `s3a://` to `s3://` in your data locations. S3FileIO doesn't support the `s3a://` scheme, it only works with `s3://`.
   > 
   > The error occurs because S3FileIO can't find a registered client for the `s3a://` storage path.
   
   Setting `spark.sql.catalog.iceberg.catalog-impl=org.apache.iceberg.spark.SparkCatalog` is not a valid setting. 
   With `catalog-impl` you would configure an actual Iceberg catalog (anything that implements `org.apache.iceberg.catalog.Catalog`). Instead of `catalog-impl` you can also use `type` to refer to the catalog type instead of having to specify the fully-qualified name of the Iceberg catalog. 
   
   
   In your case I'm assuming you're using 
   ```
   spark.sql.catalog.iceberg: org.apache.iceberg.spark.SparkCatalog
   spark.sql.catalog.iceberg.type: hive
   ```
   which means you're using Iceberg's `HiveCatalog`.
   
   Using `s3a://` with `S3FileIO` is a perfectly valid use case, so there's no need to change data locations. 
   
   However, I'm still surprised why my changes from https://github.com/apache/iceberg/pull/12799 wouldn't work with `s3a://`, since we have some tests there that make sure  this works. 
   
   @and124578963 could you please check the logs whether setting up the s3 client actually failed (which can happen if certain settings are missing) and the `[BUG] S3 client for storage path not available` is actually just the result you're seeing?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-2929970990

   @and124578963 what set of operations are you running when this exception happens? Could you please share a small example that leads to this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "and124578963 (via GitHub)" <gi...@apache.org>.
and124578963 commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-2921827619

   Hey @vanshb03,
   
   Typically, I use Iceberg 1.7.2, and my configuration with s3a:// works well.
   
   I found the following catalog-related properties in spark-defaults.conf:
   ```
   spark.sql.catalog.iceberg: org.apache.iceberg.spark.SparkCatalog
   spark.sql.catalog.iceberg.type: hive
   spark.sql.catalogImplementation=hive
   spark.sql.catalog.spark_catalog=org.apache.iceberg.spark.SparkSessionCatalog
   spark.sql.catalog.spark_catalog.type=hive
   ```
   Setting `spark.sql.catalog.iceberg.catalog-impl=org.apache.iceberg.spark.SparkCatalog` leads to some unexpected behavior. For instance, Spark starts 4 executors instead of 1.
   
   I cannot use s3:// because I'm using Hive Metastore, which only supports s3a://.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "fuatbasik (via GitHub)" <gi...@apache.org>.
fuatbasik commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-3167493701

   @and124578963 this PR might have solved your problem: https://github.com/apache/iceberg/pull/13276 
   
   I was observing a similar problem and this solved it. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] S3 client for storage path not available [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #13174:
URL: https://github.com/apache/iceberg/issues/13174#issuecomment-3167550652

   Yes #13276 should have fixed it. I'll go ahead and close this. Please reopen if you're still experiencing the same issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org