package core
Type Members
- trait WorkerDispatcher extends AutoCloseable
:: Experimental :: Manages workers for a single WorkerSpecification and hides worker details from Spark.
:: Experimental :: Manages workers for a single WorkerSpecification and hides worker details from Spark.
A WorkerDispatcher is created from a worker specification (plus context such as security scope). It owns the underlying worker processes and connections, handling pooling, reuse, and lifecycle behind the scenes. Spark interacts with workers exclusively through the WorkerSessions returned by createSession.
- Annotations
- @Experimental()
- abstract class WorkerSecurityScope extends AnyRef
:: Experimental :: Identifies a security boundary for worker connection pooling.
:: Experimental :: Identifies a security boundary for worker connection pooling.
Workers are only reused within the same security scope. Dispatcher implementations compare scopes using
equalsto decide whether an existing worker can be shared. Subclasses must overrideequalsandhashCodeso that structurally equivalent scopes match; otherwise, worker reuse will silently fail.- Annotations
- @Experimental()
- abstract class WorkerSession extends AutoCloseable
:: Experimental :: Represents one single UDF execution.
:: Experimental :: Represents one single UDF execution.
A WorkerSession is obtained from WorkerDispatcher#createSession and can carry per-execution state for that UDF invocation. Implementations may add concrete data-processing methods and lifecycle hooks as needed.
A WorkerSession is not 1-to-1 mapped to an actual worker process. Multiple WorkerSessions may be backed by the same worker when the worker is reused. Worker reuse and pooling are managed by each WorkerDispatcher implementation based on the WorkerSpecification.
- Annotations
- @Experimental()