Example #1
0
 def get_replacement_transform(self, transform):
   # TODO: Move imports to top. Pipeline <-> Runner dependency cause problems
   # with resolving imports when they are at top.
   # pylint: disable=wrong-import-position
   try:
     return LiftedCombinePerKey(transform.fn, transform.args,
                                transform.kwargs)
   except NotImplementedError:
     return transform
Example #2
0
 def apply_CombinePerKey(self, transform, pcoll):
   # TODO: Move imports to top. Pipeline <-> Runner dependency cause problems
   # with resolving imports when they are at top.
   # pylint: disable=wrong-import-position
   from apache_beam.runners.direct.helper_transforms import LiftedCombinePerKey
   try:
     return pcoll | LiftedCombinePerKey(
         transform.fn, transform.args, transform.kwargs)
   except NotImplementedError:
     return transform.expand(pcoll)