Skip to content

Commit fc0e8cc

Browse files
gildeasilviulica
authored andcommitted
Update some str methods for recent SDK representation changes
Update Operation.str() to reflect that receivers is now an array instead of a defaultdict. Update Worker* objects to not output serialized combine_fn. These problems surface only when logging at DEBUG level. ----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117727480
1 parent 9bbc79e commit fc0e8cc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

google/cloud/dataflow/worker/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def str_internal(self, is_recursive=False):
128128
if not is_recursive and getattr(self, 'receivers', []):
129129
printable_fields.append('receivers=[%s]' % ', '.join([
130130
rop.str_internal(is_recursive=True)
131-
for oplist in self.receivers.values()
131+
for oplist in self.receivers
132132
for rop in oplist]))
133133

134134
return '<%s %s>' % (printable_name, ', '.join(printable_fields))

google/cloud/dataflow/worker/maptask.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def worker_printable_fields(workerproto):
6060
# want to output value 0 but not None nor []
6161
if (value or value == 0)
6262
and name not in
63-
('coder', 'coders', 'elements', 'serialized_fn', 'window_fn',
63+
('coder', 'coders', 'elements',
64+
'combine_fn', 'serialized_fn', 'window_fn',
6465
'append_trailing_newlines', 'strip_trailing_newlines',
6566
'compression_type', 'context',
6667
'start_shuffle_position', 'end_shuffle_position',

0 commit comments

Comments
 (0)