You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Docs] Spark 4.1.x with gcs-connector 3.0.2 cannot read from GCS (NoSuchMethodError on vectored read) #2277
The compatibility table in docs/integrations/unity-catalog-spark.md tells Apache Spark 4.1.x users (bundled Hadoop 3.4.2) to load gcs-connector-3.0.2-shaded.jar for gs://. With that combination, reading a parquet or Delta table on GCS fails.
Reproduce: Spark 4.1.0, --jars gcs-connector-3.0.2-shaded.jar, the Unity Catalog and Delta packages, the GCS settings from the docs, then create a Delta table on gs:// and SELECT from it. The write works; the read fails:
org.apache.spark.SparkException: [FAILED_READ_FILE.NO_HINT] Encountered error while reading file gs://.../part-00000-....snappy.parquet
Caused by: java.lang.NoSuchMethodError: 'void org.apache.hadoop.fs.VectoredReadUtils.validateRangeRequest(org.apache.hadoop.fs.FileRange)'
at com.google.cloud.hadoop.fs.gcs.VectoredIOImpl$VectoredReadChannel.readVectored(VectoredIOImpl.java:127)
The GCS connector 3.0.2 calls a Hadoop method that has a different signature in Hadoop 3.4.2, and parquet reads through it with vectored IO.
Workaround: --conf spark.hadoop.parquet.hadoop.vectored.io.enabled=false. With it, create, insert, select, delete and select all work.
Wanted: the docs for Spark 4.1.x on GCS should either give a connector version that matches Hadoop 3.4.2, or the workaround above with a note. I have not checked Spark 4.0.x (Hadoop 3.4.1) or 4.2.x (hadoop-gcp).
Update: the clash goes away with a newer Google connector, so the parquet.hadoop.vectored.io.enabled=false workaround is not needed.
Tested on real GCS with Spark 4.1.0 (Hadoop 3.4.2), Delta 4.4.1 and gcs-connector4.0.10 (shaded), without the workaround: creating, inserting into, updating, deleting from, merging into and time-travelling a Delta table, parquet tables, and managed tables all work. The same connector also works on Spark 4.0, 4.2 and 4.3.
So the docs can give gcs-connector-4.0.10-shaded.jar for every Spark version instead of 3.0.2. That is part of #2281, which also fixes Spark 4.2 and 4.3 (#2278).
Activity
timothyw553 commentedon Nov 17, 2026
Update: the clash goes away with a newer Google connector, so the
parquet.hadoop.vectored.io.enabled=falseworkaround is not needed.Tested on real GCS with Spark 4.1.0 (Hadoop 3.4.2), Delta 4.4.1 and
gcs-connector4.0.10 (shaded), without the workaround: creating, inserting into, updating, deleting from, merging into and time-travelling a Delta table, parquet tables, and managed tables all work. The same connector also works on Spark 4.0, 4.2 and 4.3.So the docs can give
gcs-connector-4.0.10-shaded.jarfor every Spark version instead of 3.0.2. That is part of #2281, which also fixes Spark 4.2 and 4.3 (#2278).[Hadoop] Keep the GCS conflict check, hierarchical namespace and impl…