Run the fplida product pipeline inside a single slice worker
Source:R/slice_worker.R
build_fplida_slice_worker.RdEntry point called inside a PSOCK worker R process. Sets the
run-directory option so existing generators find the slice's spine,
then invokes each requested product generator in order. Skips
spine, core, and blade — these are handled
centrally by the orchestrator. Returns per-product timing and
metadata.
Usage
build_fplida_slice_worker(
slice_run_dir,
slice_id,
slice_seed,
years,
products,
export_format = "parquet",
mbs_pbs_chunk = 300000L,
product_years = NULL,
stp_zstd_level = NULL
)Arguments
- stp_zstd_level
Integer or NULL. Optional STP ZSTD compression level from 1 to 22. NULL preserves the native compression. Each file is verified before replacement. See
build_fplida().- slice_run_dir
Character. Path to slice run directory (already contains
_system/base-spine.parquet).- slice_id
Integer. 0-based slice id.
- slice_seed
Integer. Seed for this slice (orchestrator pre-computes as
base_seed + slice_id * 100000L).- years
Integer vector.
- products
Character vector. Products to build (should already exclude
spineandcore).- export_format
Character. "parquet" or "csv".
- mbs_pbs_chunk
Integer. MBS/PBS chunk_size override passed to the worker. The orchestrator sizes this to keep the \(K \times \text{chunk peak}\) total memory comfortably under machine RAM. Default 300000.
- product_years
Named list or NULL. Per-product years already narrowed to each dataset's published period by the orchestrator (see
plida_dataset_years()). A product missing from the list falls back toyears, narrowed here instead.