Skip to content

Commit d3c3fe1

Browse files
committed
Log a communication setup message
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 4cedcb1 commit d3c3fe1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

communication/src/logging.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ pub enum CommunicationEvent {
1818
Message(MessageEvent),
1919
/// A state transition.
2020
State(StateEvent),
21+
/// Setup event
22+
Setup(CommunicationSetup)
2123
}
2224

2325
/// An observed message.

timely/src/execute.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Starts a timely dataflow execution from configuration information and per-worker logic.
22
3+
use timely_communication::logging::CommunicationEvent;
34
use crate::communication::{initialize_from, Allocator, allocator::AllocateBuilder, WorkerGuards};
45
use crate::dataflow::scopes::Child;
56
use crate::worker::Worker;
@@ -242,11 +243,13 @@ where
242243
if let Ok(stream) = TcpStream::connect(&addr) {
243244
let writer = EventWriterCore::new(stream);
244245
let mut logger = BatchLogger::new(writer);
245-
result = Some(crate::logging_core::Logger::new(
246+
let logger = crate::logging_core::Logger::new(
246247
::std::time::Instant::now(),
247248
::std::time::Duration::default(),
248249
move |time, data| logger.publish_batch(time, data)
249-
));
250+
);
251+
logger.log(CommunicationEvent::Setup(events_setup));
252+
result = Some(logger);
250253
}
251254
else {
252255
panic!("Could not connect to communication log address: {:?}", addr);

0 commit comments

Comments
 (0)