コード例 #1
0
ファイル: DataSet.py プロジェクト: chiwanpark/flink
 def with_broadcast_set(self, name, set):
     child = OperationInfo()
     child.identifier = _Identifier.BROADCAST
     child.parent = self._info
     child.other = set._info
     child.name = name
     self._info.bcvars.append(child)
     self._env._broadcast.append(child)
     return self
コード例 #2
0
 def with_broadcast_set(self, name, set):
     child = OperationInfo()
     child.parent = self._info
     child.other = set._info
     child.name = name
     self._info.bcvars.append(child)
     set._info.children.append(child)
     self._env._broadcast.append(child)
     return self
コード例 #3
0
ファイル: DataSet.py プロジェクト: chiwanpark/flink
 def _cross(self, other_set, identifier):
     child = OperationInfo()
     child_set = CrossOperator(self._env, child)
     child.identifier = identifier
     child.parent = self._info
     child.other = other_set._info
     self._info.children.append(child)
     other_set._info.children.append(child)
     self._env._sets.append(child)
     return child_set
コード例 #4
0
ファイル: DataSet.py プロジェクト: tarunnar/pyflink
 def _cross(self, other_set, identifier):
     child = OperationInfo()
     child_set = CrossOperator(self._env, child)
     child.identifier = identifier
     child.parent = self._info
     child.other = other_set._info
     self._info.children.append(child)
     other_set._info.children.append(child)
     self._env._sets.append(child)
     return child_set
コード例 #5
0
ファイル: DataSet.py プロジェクト: chiwanpark/flink
    def union(self, other_set):
        """
        Creates a union of this DataSet with an other DataSet.

        The other DataSet must be of the same data type.

        :param other_set: The other DataSet which is unioned with the current DataSet.
        :return:The resulting DataSet.
        """
        child = OperationInfo()
        child_set = DataSet(self._env, child)
        child.identifier = _Identifier.UNION
        child.parent = self._info
        child.other = other_set._info
        self._info.children.append(child)
        other_set._info.children.append(child)
        self._env._sets.append(child)
        return child_set
コード例 #6
0
ファイル: DataSet.py プロジェクト: tarunnar/pyflink
    def union(self, other_set):
        """
        Creates a union of this DataSet with an other DataSet.

        The other DataSet must be of the same data type.

        :param other_set: The other DataSet which is unioned with the current DataSet.
        :return:The resulting DataSet.
        """
        child = OperationInfo()
        child_set = DataSet(self._env, child)
        child.identifier = _Identifier.UNION
        child.parent = self._info
        child.other = other_set._info
        self._info.children.append(child)
        other_set._info.children.append(child)
        self._env._sets.append(child)
        return child_set
コード例 #7
0
    def co_group(self, other_set):
        """
        Initiates a CoGroup transformation which combines the elements of two DataSets into on DataSet.

        It groups each DataSet individually on a key and gives groups of both DataSets with equal keys together into a
        CoGroupFunction. If a DataSet has a group with no matching key in the other DataSet,
        the CoGroupFunction is called with an empty group for the non-existing group.
        The CoGroupFunction can iterate over the elements of both groups and return any number of elements
        including none.

        :param other_set: The other DataSet of the CoGroup transformation.
        :return:A CoGroupOperator to continue the definition of the CoGroup transformation.
        """
        child = OperationInfo()
        other_set._info.children.append(child)
        child_set = CoGroupOperatorWhere(self._env, child)
        child.identifier = _Identifier.COGROUP
        child.parent = self._info
        child.other = other_set._info
        self._info.children.append(child)
        return child_set
コード例 #8
0
ファイル: DataSet.py プロジェクト: SanthoshPoudapally/flink
    def co_group(self, other_set):
        """
        Initiates a CoGroup transformation which combines the elements of two DataSets into on DataSet.

        It groups each DataSet individually on a key and gives groups of both DataSets with equal keys together into a
        CoGroupFunction. If a DataSet has a group with no matching key in the other DataSet,
        the CoGroupFunction is called with an empty group for the non-existing group.
        The CoGroupFunction can iterate over the elements of both groups and return any number of elements
        including none.

        :param other_set: The other DataSet of the CoGroup transformation.
        :return:A CoGroupOperator to continue the definition of the CoGroup transformation.
        """
        child = OperationInfo()
        other_set._info.children.append(child)
        child_set = CoGroupOperatorWhere(self._env, child)
        child.identifier = _Identifier.COGROUP
        child.parent = self._info
        child.other = other_set._info
        self._info.children.append(child)
        return child_set