Class DataSourceModule
java.lang.Object
org.elasticsearch.xpack.esql.datasources.DataSourceModule
- All Implemented Interfaces:
Closeable,AutoCloseable
Module that collects all data source implementations from plugins.
This module registers lazy delegating factories per-plugin so that heavy dependencies
(AWS SDK, Parquet, Arrow) are only loaded when a query targets that backend.
Capability declarations (DataSourceCapabilities) are used for cheap routing
and early validation without triggering classloading.
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled) DataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled, ThreadPool threadPool, Environment environment, ResourceWatcherService resourceWatcherService, MeterRegistry meterRegistry) DataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled, ThreadPool threadPool, Environment environment, ResourceWatcherService resourceWatcherService, MeterRegistry meterRegistry, LocalFileAccess localFileAccess) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createOperatorFactoryRegistry(Executor executor) Convenience overload that backs BOTH registry roles with a single executor.createOperatorFactoryRegistry(Executor executor, Executor fileReadExecutor) The node-level external-source telemetry holder, orExternalSourceMetrics.NOOPwhen no registry was supplied.
-
Constructor Details
-
DataSourceModule
public DataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled) -
DataSourceModule
public DataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled, @Nullable ThreadPool threadPool, @Nullable Environment environment, @Nullable ResourceWatcherService resourceWatcherService, @Nullable MeterRegistry meterRegistry) -
DataSourceModule
public DataSourceModule(List<DataSourcePlugin> dataSourcePlugins, DataSourceCapabilities capabilities, Settings settings, BlockFactory blockFactory, ExecutorService executor, DataSourceCredentials credentials, BooleanSupplier managedIdentityEnabled, @Nullable ThreadPool threadPool, @Nullable Environment environment, @Nullable ResourceWatcherService resourceWatcherService, @Nullable MeterRegistry meterRegistry, LocalFileAccess localFileAccess)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
capabilities
-
storageProviderRegistry
-
formatReaderRegistry
-
sourceFactories
-
externalSourceMetrics
The node-level external-source telemetry holder, orExternalSourceMetrics.NOOPwhen no registry was supplied. -
createOperatorFactoryRegistry
Convenience overload that backs BOTH registry roles with a single executor. This collapses the page-consumer/coordination role and the read/parse role onto one pool, which is the exact wiring that deadlocks multi-file text reads in production (a full pool of blocked parser workers with no free thread left to run the drain that consumes them). It is safe only for synchronous / single-threaded callers (e.g.Runnable::runin tests). Production wiring must usecreateOperatorFactoryRegistry(Executor, Executor)with two distinct pools — seeTransportEsqlQueryAction. -
createOperatorFactoryRegistry
public OperatorFactoryRegistry createOperatorFactoryRegistry(Executor executor, Executor fileReadExecutor)
-