Skip to content

Commit cd1d51a

Browse files
committed
Fix lint
1 parent 31492e1 commit cd1d51a

5 files changed

Lines changed: 24 additions & 2 deletions

File tree

ballista/core/src/execution_plans/shuffle_writer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ impl ShuffleWriterExec {
350350
}
351351

352352
/// Executes shuffle write to disk (original behavior).
353+
#[allow(clippy::too_many_arguments)]
353354
async fn execute_shuffle_write_disk(
354355
mut path: PathBuf,
355356
input_partition: usize,
@@ -471,7 +472,7 @@ impl ShuffleWriterExec {
471472
let mut part_locs = vec![];
472473

473474
for (i, w) in writers.into_iter().enumerate() {
474-
if let Some(mut w) = w {
475+
if let Some(w) = w {
475476
let num_bytes = fs::metadata(&w.path)?.len();
476477
w.writer.finish()?;
477478
debug!(

ballista/scheduler/src/api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use datafusion_proto::logical_plan::AsLogicalPlan;
1919
use datafusion_proto::physical_plan::AsExecutionPlan;
2020
use std::sync::Arc;
2121

22+
/// Creates the API routes for the scheduler REST API.
2223
pub fn get_routes<
2324
T: AsLogicalPlan + Clone + Send + Sync + 'static,
2425
U: AsExecutionPlan + Send + Sync + 'static,

ballista/scheduler/src/metrics/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
/// Prometheus metrics collector implementation.
1819
#[cfg(feature = "prometheus")]
1920
pub mod prometheus;
2021

ballista/scheduler/src/metrics/prometheus.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub struct PrometheusMetricsCollector {
4949
}
5050

5151
impl PrometheusMetricsCollector {
52+
/// Creates a new PrometheusMetricsCollector with the given registry.
5253
pub fn new(registry: &Registry) -> Result<Self> {
5354
let execution_time = register_histogram_with_registry!(
5455
"job_exec_time_seconds",
@@ -126,14 +127,15 @@ impl PrometheusMetricsCollector {
126127
})
127128
}
128129

130+
/// Returns the current global PrometheusMetricsCollector instance.
129131
pub fn current() -> Result<Arc<dyn SchedulerMetricsCollector>> {
130132
COLLECTOR
131133
.get_or_try_init(|| {
132134
let collector = Self::new(::prometheus::default_registry())?;
133135

134136
Ok(Arc::new(collector) as Arc<dyn SchedulerMetricsCollector>)
135137
})
136-
.map(|arc| arc.clone())
138+
.cloned()
137139
}
138140
}
139141

@@ -206,6 +208,22 @@ impl SchedulerMetricsCollector for PrometheusMetricsCollector {
206208
}
207209
fn record_task_retry(&self, _job_id: &str, _stage_id: usize) {}
208210

211+
// Shuffle affinity - not tracked by default Prometheus collector
212+
fn record_task_shuffle_affinity_hit(
213+
&self,
214+
_job_id: &str,
215+
_stage_id: usize,
216+
_executor_id: &str,
217+
) {
218+
}
219+
fn record_task_shuffle_affinity_miss(
220+
&self,
221+
_job_id: &str,
222+
_stage_id: usize,
223+
_executor_id: &str,
224+
) {
225+
}
226+
209227
// Executor management - not tracked by default Prometheus collector
210228
fn set_active_executor_count(&self, _count: usize) {}
211229
fn record_executor_registered(&self, _executor_id: &str) {}

ballista/scheduler/src/scheduler_server/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use crate::state::task_manager::TaskLauncher;
4646
// include the generated protobuf source as a submodule
4747
#[cfg(feature = "keda-scaler")]
4848
#[allow(clippy::all)]
49+
#[allow(missing_docs)]
4950
pub mod externalscaler {
5051
include!(concat!(env!("OUT_DIR"), "/externalscaler.rs"));
5152
}

0 commit comments

Comments
 (0)