pub struct EtlExecutor { /* private fields */ }Expand description
ETL executor — periodically moves data from source tier to destination tier.
Implementations§
Source§impl EtlExecutor
impl EtlExecutor
pub fn new( source: Arc<PlainPbStoragePlugin>, dest: Arc<PlainPbStoragePlugin>, period_secs: u64, hold: u32, gather: u32, ) -> Self
Sourcepub fn with_pv_registry(self, registry: Arc<PvRegistry>) -> Self
pub fn with_pv_registry(self, registry: Arc<PvRegistry>) -> Self
Wire a PV registry so the executor can skip paused PVs in
run_once. Java parity (92db337): without this, PB files for a
paused PV continue to migrate out of the STS, which surprises
operators who expect the data to stay accessible there until the
PV resumes.
Sourcepub async fn run(&self, shutdown: Receiver<bool>)
pub async fn run(&self, shutdown: Receiver<bool>)
Run the ETL loop. Call this as a spawned task.
pub fn source_name(&self) -> &str
pub fn dest_name(&self) -> &str
Sourcepub async fn consolidate_pv(&self, pv: &str) -> Result<u64>
pub async fn consolidate_pv(&self, pv: &str) -> Result<u64>
Force-move every PB file the source tier currently holds for pv
to the destination tier, ignoring hold / gather constraints.
Drives the consolidateDataForPV BPL endpoint.
The same crash-safe move_file is reused, so partial failures leave the source either fully migrated or untouched.
Auto Trait Implementations§
impl Freeze for EtlExecutor
impl RefUnwindSafe for EtlExecutor
impl Send for EtlExecutor
impl Sync for EtlExecutor
impl Unpin for EtlExecutor
impl UnsafeUnpin for EtlExecutor
impl UnwindSafe for EtlExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more