Don't record event log on driver. (#1217)

This commit is contained in:
Robert Nishihara
2017-11-16 23:17:59 -08:00
committed by Philipp Moritz
parent 0eae917766
commit 9a2e37a63e
+4 -1
View File
@@ -2095,7 +2095,10 @@ def log(event_type, kind, contents=None, worker=global_worker):
assert isinstance(contents, dict)
# Make sure all of the keys and values in the dictionary are strings.
contents = {str(k): str(v) for k, v in contents.items()}
worker.events.append((time.time(), event_type, kind, contents))
# Log the event if this is a worker and not a driver, since the driver's
# event log never gets flushed.
if worker.mode == WORKER_MODE:
worker.events.append((time.time(), event_type, kind, contents))
def flush_log(worker=global_worker):