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 configure only num_workers_per_node:
Do not set both worker controls. Do not place num_workers inside xenna_stage_spec; use with_(num_workers=...) or override the stage’s num_workers() method.
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: