Ejemplo n.º 1
0
    def apply_GroupByKey(self, transform, pcoll):
        coder = self._get_coder(pcoll.element_type or typehints.Any, None)
        if not coder.is_kv_coder():
            raise ValueError(
                ('Coder for the GroupByKey operation "%s" is not a '
                 'key-value coder: %s.') % (transform.label, coder))
        # TODO(robertwb): Update the coder itself if it changed.
        coders.registry.verify_deterministic(
            coder.key_coder(), 'GroupByKey operation "%s"' % transform.label)

        return pvalue.PCollection(pcoll.pipeline)
Ejemplo n.º 2
0
 def apply_CombineValues(self, transform, pcoll):
     return pvalue.PCollection(pcoll.pipeline)
Ejemplo n.º 3
0
 def apply(self, pbegin):
     assert isinstance(pbegin, pvalue.PBegin)
     self.pipeline = pbegin.pipeline
     return pvalue.PCollection(self.pipeline)
Ejemplo n.º 4
0
 def apply(self, pcoll):
   self.side_output_tags = set()
   # TODO(robertwb): Change all uses of the dofn attribute to use fn instead.
   self.dofn = self.fn
   return pvalue.PCollection(pcoll.pipeline)
Ejemplo n.º 5
0
 def apply(self, pcolls):
   for pcoll in pcolls:
     self._check_pcollection(pcoll)
   return pvalue.PCollection(self.pipeline)
Ejemplo n.º 6
0
 def apply(self, pcoll):
   self._check_pcollection(pcoll)
   return pvalue.PCollection(pcoll.pipeline)