[Streaming] operator chain (#8910)

This commit is contained in:
chaokunyang
2020-06-18 15:11:07 +08:00
committed by GitHub
parent 003cec87b4
commit 5edddf6eac
39 changed files with 1058 additions and 140 deletions
+11
View File
@@ -60,6 +60,17 @@ class RoundRobinPartition(Partition):
return self.__partitions
class ForwardPartition(Partition):
"""Default partition for operator if the operator can be chained with
succeeding operators."""
def __init__(self):
self.__partitions = [0]
def partition(self, key_record, num_partition: int):
return self.__partitions
class SimplePartition(Partition):
"""Wrap a python function as subclass of :class:`Partition`"""