Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add REST endpoint to get DOT graph of a job #242

Merged
merged 25 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clippy
  • Loading branch information
andygrove committed Sep 18, 2022
commit 8bf33e8b5a6e57e43319719bc197a1a28d961876
7 changes: 1 addition & 6 deletions ballista/rust/scheduler/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@ pub fn get_routes<T: AsLogicalPlan + Clone, U: 'static + AsExecutionPlan>(
.and_then(handlers::get_state);

let route_job_summary = warp::path!("jobs" / String)
.and(with_data_server(scheduler_server.clone()))
.and(with_data_server(scheduler_server))
.and_then(|job_id, data_server| handlers::get_job_summary(data_server, job_id));

// let route_graph = warp::path("jobs" / job_id / "graph" )
// .and(with_data_server(scheduler_server.clone()))
// .map(|x, job_id| handlers::get_execution_graph(x, job_id).await);
// .and(with_data_server(scheduler_server))
// .and_then();
let routes = route_state.or(route_job_summary);
routes.boxed()
}
2 changes: 1 addition & 1 deletion ballista/rust/scheduler/src/state/task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> TaskManager<T, U>
if let Some(graph) = self.get_active_execution_graph(job_id).await {
Ok(Some(Arc::new(graph.read().await.clone())))
} else if let Ok(graph) = self.get_execution_graph(job_id).await {
Ok(Some(Arc::new(graph.clone())))
Ok(Some(Arc::new(graph)))
} else {
// if the job failed then we return no graph for now
Ok(None)
Expand Down