yahoNanJing commented on a change in pull request #1560:
URL: https://github.com/apache/arrow-datafusion/pull/1560#discussion_r787416352
##########
File path: ballista/rust/executor/src/main.rs
##########
@@ -94,32 +97,54 @@ async fn main() -> Result<()> {
.clone()
.map(executor_registration::OptionalHost::Host),
port: port as u32,
+ grpc_port: grpc_port as u32,
};
+ let executor_specification = ExecutorSpecification {
+ task_slots: opt.concurrent_tasks as u32,
+ };
+ let executor = Arc::new(Executor::new_with_specification(
+ &work_dir,
+ executor_specification,
+ ));
let scheduler = SchedulerGrpcClient::connect(scheduler_url)
.await
.context("Could not connect to scheduler")?;
- let executor = Arc::new(Executor::new(&work_dir));
-
- let service = BallistaFlightService::new(executor.clone());
+ let scheduler_policy = opt.task_scheduling_policy;
+ match scheduler_policy {
+ TaskSchedulingPolicy::PushStaged => {
+ tokio::spawn(executor_server::startup(
+ scheduler,
+ executor.clone(),
+ executor_meta,
+ ));
+ }
+ _ => {
+ tokio::spawn(execution_loop::poll_loop(
Review comment:
Hi @houqp, actually I prefer to only keep the push-based model. Maybe
once the push-based model become stable, we can remove the pull-based one. Or
do more refactoring to move the pull-based code to some place not so obvious.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]