XennaExecutor
XennaExecutor is the production executor that uses Cosmos-Xenna for distributed execution. It’s the default executor used when running pipelines.
Import
Class Definition
Configuration Options
Usage Examples
Default Configuration
Per-Stage Worker Overrides
Use num_workers for a cluster-wide count. To request workers per node instead, leave num_workers unset and use the common num_workers_per_node override:
Do not set both worker controls. Do not place num_workers inside xenna_stage_spec; use the common with_() arguments or override the corresponding stage method. The legacy xenna_stage_spec={"num_workers_per_node": N} form remains supported when neither common worker hook is set.
See Stage Worker Sizing for scope, invalid-combination behavior, and with_() merge semantics.
Custom Configuration
Streaming vs Batch Mode
Streaming Mode
Batch Mode
Processes tasks as they become available:
Best for:
- Large datasets
- Memory-constrained environments
- Real-time processing
Methods
execute()
Execute the pipeline stages.
Error Handling
Performance Monitoring
The executor automatically collects performance metrics: