Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Update some str methods for recent SDK representation changes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gildea authored and silviulica committed Mar 21, 2016
1 parent 9bbc79e commit fc0e8cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/cloud/dataflow/worker/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def str_internal(self, is_recursive=False):
if not is_recursive and getattr(self, 'receivers', []):
printable_fields.append('receivers=[%s]' % ', '.join([
rop.str_internal(is_recursive=True)
for oplist in self.receivers.values()
for oplist in self.receivers
for rop in oplist]))

return '<%s %s>' % (printable_name, ', '.join(printable_fields))
Expand Down
3 changes: 2 additions & 1 deletion google/cloud/dataflow/worker/maptask.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def worker_printable_fields(workerproto):
# want to output value 0 but not None nor []
if (value or value == 0)
and name not in
('coder', 'coders', 'elements', 'serialized_fn', 'window_fn',
('coder', 'coders', 'elements',
'combine_fn', 'serialized_fn', 'window_fn',
'append_trailing_newlines', 'strip_trailing_newlines',
'compression_type', 'context',
'start_shuffle_position', 'end_shuffle_position',
Expand Down

0 comments on commit fc0e8cc

Please sign in to comment.