Class GcsStorageProvider

java.lang.Object
org.elasticsearch.xpack.esql.datasource.gcs.GcsStorageProvider
All Implemented Interfaces:
Closeable, AutoCloseable, StorageProvider

public final class GcsStorageProvider extends Object implements StorageProvider
StorageProvider implementation for Google Cloud Storage.

Supports the gs:// URI scheme. Authentication can be provided via:

  • Explicit service account JSON credentials
  • Application Default Credentials (ADC) — environment variable, metadata server, etc.

GcsStorageObject provides optimized I/O via GCS ReadChannel:

  • readBytes reads directly into ByteBuffer without intermediate copies
  • readBytesAsync uses executor-based async with efficient ReadChannel reads
The async path blocks a worker thread (not truly non-blocking like HTTP sendAsync or S3AsyncClient) but avoids the byte[] allocation overhead of the default InputStream-based wrappers.