fn local_execution<T: Data, U: Data, F>(jt: JobTracker<F, U, T>) -> Result<Option<Vec<U>>>
    where
        F: SerFunc((TaskContext, Box<dyn Iterator<Item = T>>)) -> U,
    {
        if jt.final_stage.parents.is_empty() && (jt.num_output_parts == 1) {
            let split = (jt.final_rdd.splits()[jt.output_parts[0]]).clone();
            let task_context = TaskContext::new(jt.final_stage.id, jt.output_parts[0], 0);
            Ok(Some(vec![(&jt.func)((
                task_context,
                jt.final_rdd.iterator(split)?,
            ))]))
        } else {
            Ok(None)
        }
    }
/// Fast path for execution. Runs the DD in the driver main thread if possible.
Fast path for execution. Runs the DD in the driver main thread if possible.
Fast path for execution . Runs the DD in the driver main thread if possible .
fn local_execution<T: Data, U: Data, F>(jt: JobTracker<F, U, T>) -> Result<Option<Vec<U>>>
    where
        F: SerFunc((TaskContext, Box<dyn Iterator<Item = T>>)) -> U,
    {
        if jt.final_stage.parents.is_empty() && (jt.num_output_parts == 1) {
            let split = (jt.final_rdd.splits()[jt.output_parts[0]]).clone();
            let task_context = TaskContext::new(jt.final_stage.id, jt.output_parts[0], 0);
            Ok(Some(vec![(&jt.func)((
                task_context,
                jt.final_rdd.iterator(split)?,
            ))]))
        } else {
            Ok(None)
        }
    }
fn local_execution < T : Data , U : Data , F > ( jt : JobTracker < F , U , T > ) -> Result < Option < Vec < U > > > where F : SerFunc ( ( TaskContext , Box < dyn Iterator < Item = T > > ) ) -> U , { if jt . final_stage . parents . is_empty ( ) && ( jt . num_output_parts == 1 ) { let split = ( jt . final_rdd . splits ( ) [ jt . output_parts [ 0 ] ] ) . clone ( ) ; let task_context = TaskContext :: new ( jt . final_stage . id , jt . output_parts [ 0 ] , 0 ) ; Ok ( Some ( vec ! [ ( jt func ) ( ( task_context jt final_rdd iterator ( split ) ) ) ] ) ) } else { Ok ( None ) } }
Fast path for execution.
Fast path for execution .
jt
JobTracker<F, U, T>