You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ag...@apache.org on 2021/05/27 00:57:21 UTC
[arrow-datafusion] branch master updated: #352:
BallistaContext::collect() logging is too noisy (#394)
This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 3f7736c #352: BallistaContext::collect() logging is too noisy (#394)
3f7736c is described below
commit 3f7736c4efc1199b0ee63f7ce2f9ac6eb3b5b2e0
Author: Javier Goday <jg...@gmail.com>
AuthorDate: Thu May 27 02:57:10 2021 +0200
#352: BallistaContext::collect() logging is too noisy (#394)
---
ballista/rust/client/src/context.rs | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/ballista/rust/client/src/context.rs b/ballista/rust/client/src/context.rs
index e26dcac..df97e3a 100644
--- a/ballista/rust/client/src/context.rs
+++ b/ballista/rust/client/src/context.rs
@@ -186,6 +186,8 @@ impl BallistaContext {
.into_inner()
.job_id;
+ let mut prev_status: Option<job_status::Status> = None;
+
loop {
let GetJobStatusResult { status } = scheduler
.get_job_status(GetJobStatusParams {
@@ -198,14 +200,21 @@ impl BallistaContext {
DataFusionError::Internal("Received empty status message".to_owned())
})?;
let wait_future = tokio::time::sleep(Duration::from_millis(100));
+ let has_status_change = prev_status.map(|x| x != status).unwrap_or(true);
match status {
job_status::Status::Queued(_) => {
- info!("Job {} still queued...", job_id);
+ if has_status_change {
+ info!("Job {} still queued...", job_id);
+ }
wait_future.await;
+ prev_status = Some(status);
}
job_status::Status::Running(_) => {
- info!("Job {} is running...", job_id);
+ if has_status_change {
+ info!("Job {} is running...", job_id);
+ }
wait_future.await;
+ prev_status = Some(status);
}
job_status::Status::Failed(err) => {
let msg = format!("Job {} failed: {}", job_id, err.error);