Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Jan 2, 2024
1 parent 5d0eeee commit 0187a53
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 37 deletions.
2 changes: 1 addition & 1 deletion ballista/client/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,4 @@ impl BallistaContext {
_ => ctx.execute_logical_plan(plan).await,
}
}
}
}
2 changes: 1 addition & 1 deletion ballista/executor/src/executor_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ use ballista_core::BALLISTA_VERSION;

use crate::execution_engine::ExecutionEngine;
use crate::executor::{Executor, TasksDrainedFuture};
use crate::executor_server;
use crate::executor_server::TERMINATING;
use crate::flight_service::BallistaFlightService;
use crate::metrics::LoggingMetricsCollector;
use crate::shutdown::Shutdown;
use crate::shutdown::ShutdownNotifier;
use crate::terminate;
use crate::{executor_server};

pub struct ExecutorProcessConfig {
pub bind_host: String,
Expand Down
7 changes: 3 additions & 4 deletions ballista/scheduler/src/cluster/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

use crate::cluster::storage::{KeyValueStore, Keyspace, Lock, Operation, WatchEvent};
use crate::cluster::{
bind_task_bias, bind_task_round_robin,
BoundTask, ClusterState, ExecutorHeartbeatStream,
ExecutorSlot, JobState, JobStateEvent, JobStateEventStream, JobStatus,
TaskDistributionPolicy,
bind_task_bias, bind_task_round_robin, BoundTask, ClusterState,
ExecutorHeartbeatStream, ExecutorSlot, JobState, JobStateEvent, JobStateEventStream,
JobStatus, TaskDistributionPolicy,
};
use crate::scheduler_server::{timestamp_secs, SessionBuilder};
use crate::state::execution_graph::ExecutionGraph;
Expand Down
9 changes: 4 additions & 5 deletions ballista/scheduler/src/cluster/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
// under the License.

use crate::cluster::{
bind_task_bias, bind_task_round_robin,
BoundTask, ClusterState, ExecutorSlot, JobState,
JobStateEvent, JobStateEventStream, JobStatus, TaskDistributionPolicy,
bind_task_bias, bind_task_round_robin, BoundTask, ClusterState, ExecutorSlot,
JobState, JobStateEvent, JobStateEventStream, JobStatus, TaskDistributionPolicy,
};
use crate::state::execution_graph::ExecutionGraph;
use async_trait::async_trait;
Expand All @@ -37,12 +36,12 @@ use crate::scheduler_server::{timestamp_millis, timestamp_secs, SessionBuilder};
use crate::state::session_manager::create_datafusion_context;
use crate::state::task_manager::JobInfoCache;
use ballista_core::serde::protobuf::job_status::Status;
use log::{warn};
use log::warn;
use std::collections::{HashMap, HashSet};
use std::ops::DerefMut;

use std::sync::Arc;
use tokio::sync::{Mutex, };
use tokio::sync::Mutex;
use tracing::debug;

#[derive(Default)]
Expand Down
4 changes: 1 addition & 3 deletions ballista/scheduler/src/cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,7 @@ mod test {
use ballista_core::serde::protobuf::AvailableTaskSlots;
use ballista_core::serde::scheduler::{ExecutorMetadata, ExecutorSpecification};

use crate::cluster::{
bind_task_bias, bind_task_round_robin, BoundTask,
};
use crate::cluster::{bind_task_bias, bind_task_round_robin, BoundTask};
use crate::state::execution_graph::ExecutionGraph;
use crate::state::task_manager::JobInfoCache;
use crate::test_utils::{mock_completed_task, test_aggregation_plan_with_job_id};
Expand Down
3 changes: 1 addition & 2 deletions ballista/scheduler/src/scheduler_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ pub async fn start_server(
config.grpc_server_max_decoding_message_size as usize,
);

let tonic_builder = create_grpc_server()
.add_service(scheduler_grpc_server);
let tonic_builder = create_grpc_server().add_service(scheduler_grpc_server);

#[cfg(feature = "flight-sql")]
let tonic_builder = tonic_builder.add_service(FlightServiceServer::new(
Expand Down
22 changes: 10 additions & 12 deletions ballista/scheduler/src/scheduler_server/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ use std::convert::TryInto;
use ballista_core::serde::protobuf::executor_registration::OptionalHost;
use ballista_core::serde::protobuf::scheduler_grpc_server::SchedulerGrpc;
use ballista_core::serde::protobuf::{
execute_query_failure_result, execute_query_result,
CancelJobParams, CancelJobResult, CleanJobDataParams, CleanJobDataResult,
CreateSessionParams, CreateSessionResult, ExecuteQueryFailureResult,
ExecuteQueryParams, ExecuteQueryResult, ExecuteQuerySuccessResult, ExecutorHeartbeat,
ExecutorStoppedParams, ExecutorStoppedResult, GetFileMetadataParams,
GetFileMetadataResult, GetJobStatusParams, GetJobStatusResult, HeartBeatParams,
HeartBeatResult, RegisterExecutorParams,
RegisterExecutorResult, RemoveSessionParams, RemoveSessionResult,
UpdateSessionParams, UpdateSessionResult, UpdateTaskStatusParams,
UpdateTaskStatusResult,
execute_query_failure_result, execute_query_result, CancelJobParams, CancelJobResult,
CleanJobDataParams, CleanJobDataResult, CreateSessionParams, CreateSessionResult,
ExecuteQueryFailureResult, ExecuteQueryParams, ExecuteQueryResult,
ExecuteQuerySuccessResult, ExecutorHeartbeat, ExecutorStoppedParams,
ExecutorStoppedResult, GetFileMetadataParams, GetFileMetadataResult,
GetJobStatusParams, GetJobStatusResult, HeartBeatParams, HeartBeatResult,
RegisterExecutorParams, RegisterExecutorResult, RemoveSessionParams,
RemoveSessionResult, UpdateSessionParams, UpdateSessionResult,
UpdateTaskStatusParams, UpdateTaskStatusResult,
};
use ballista_core::serde::scheduler::ExecutorMetadata;

Expand Down Expand Up @@ -555,8 +554,7 @@ mod test {
use ballista_core::error::BallistaError;
use ballista_core::serde::protobuf::{
executor_registration::OptionalHost, executor_status, ExecutorRegistration,
ExecutorStatus, ExecutorStoppedParams, HeartBeatParams,
RegisterExecutorParams,
ExecutorStatus, ExecutorStoppedParams, HeartBeatParams, RegisterExecutorParams,
};
use ballista_core::serde::scheduler::ExecutorSpecification;
use ballista_core::serde::BallistaCodec;
Expand Down
13 changes: 5 additions & 8 deletions ballista/scheduler/src/scheduler_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,25 +339,22 @@ mod test {

use datafusion::test_util::scan_empty;

use ballista_core::config::{
TaskSchedulingPolicy,
};
use ballista_core::config::TaskSchedulingPolicy;
use ballista_core::error::Result;

use crate::config::SchedulerConfig;

use ballista_core::serde::protobuf::{
failed_task, job_status, task_status, ExecutionError, FailedTask, JobStatus,
MultiTaskDefinition, SuccessfulJob,
TaskId, TaskStatus,
MultiTaskDefinition, SuccessfulJob, TaskId, TaskStatus,
};

use crate::scheduler_server::{timestamp_millis, };
use crate::scheduler_server::timestamp_millis;

use crate::test_utils::{
assert_completed_event, assert_failed_event, assert_no_submitted_event,
assert_submitted_event, ExplodingTableProvider,
SchedulerTest, TaskRunnerFn, TestMetricsCollector,
assert_submitted_event, ExplodingTableProvider, SchedulerTest, TaskRunnerFn,
TestMetricsCollector,
};

#[tokio::test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ impl ExecutionStage {
ExecutionStage::Failed(_) => "Failed",
}
}

}

/// For a stage whose input stages are not all completed, we say it's a unresolved stage
Expand Down

0 comments on commit 0187a53

Please sign in to comment.