From 126bed603eee5a970cd2187490716570a2d6e1d9 Mon Sep 17 00:00:00 2001 From: yangzhong Date: Wed, 19 Jul 2023 10:25:50 +0800 Subject: [PATCH] Fix for compilation and cargo clippy --- ballista/scheduler/src/cluster/kv.rs | 4 ++-- ballista/scheduler/src/cluster/memory.rs | 4 ++-- ballista/scheduler/src/cluster/mod.rs | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ballista/scheduler/src/cluster/kv.rs b/ballista/scheduler/src/cluster/kv.rs index cdd513c83..53372f8df 100644 --- a/ballista/scheduler/src/cluster/kv.rs +++ b/ballista/scheduler/src/cluster/kv.rs @@ -39,7 +39,7 @@ use ballista_core::serde::protobuf::{ use ballista_core::serde::scheduler::{ExecutorData, ExecutorMetadata}; use ballista_core::serde::BallistaCodec; use dashmap::DashMap; -use datafusion::physical_plan::file_format::get_scan_files; +use datafusion::datasource::physical_plan::get_scan_files; use datafusion::physical_plan::ExecutionPlan; use datafusion::prelude::SessionContext; use datafusion_proto::logical_plan::AsLogicalPlan; @@ -295,7 +295,7 @@ impl .collect(); let ch_topology = ch_topology.unwrap(); for node in ch_topology.nodes() { - if let Some(mut data) = executor_data.get_mut(&node.id) { + if let Some(data) = executor_data.get_mut(&node.id) { data.slots = node.available_slots; } else { error!("Fail to find executor data for {}", &node.id); diff --git a/ballista/scheduler/src/cluster/memory.rs b/ballista/scheduler/src/cluster/memory.rs index f91ecf059..03a9358d7 100644 --- a/ballista/scheduler/src/cluster/memory.rs +++ b/ballista/scheduler/src/cluster/memory.rs @@ -42,7 +42,7 @@ use std::collections::{HashMap, HashSet}; use std::ops::DerefMut; use ballista_core::consistent_hash::node::Node; -use datafusion::physical_plan::file_format::get_scan_files; +use datafusion::datasource::physical_plan::get_scan_files; use datafusion::physical_plan::ExecutionPlan; use std::sync::Arc; use tokio::sync::{Mutex, MutexGuard}; @@ -161,7 +161,7 @@ impl ClusterState for InMemoryClusterState { // Update the available slots let ch_topology = ch_topology.unwrap(); for node in ch_topology.nodes() { - if let Some(mut data) = guard.get_mut(&node.id) { + if let Some(data) = guard.get_mut(&node.id) { data.slots = node.available_slots; } else { error!("Fail to find executor data for {}", &node.id); diff --git a/ballista/scheduler/src/cluster/mod.rs b/ballista/scheduler/src/cluster/mod.rs index 47c0a6d37..12938aa12 100644 --- a/ballista/scheduler/src/cluster/mod.rs +++ b/ballista/scheduler/src/cluster/mod.rs @@ -1061,6 +1061,7 @@ mod test { location: Path::from(format!("file--{}", i)), last_modified: Default::default(), size: 1, + e_tag: None, }, partition_values: vec![], range: None,