...
- Operator-Ids (mandatory): one or more operatorIds for operators the need to be parallelized. If more than one id is defined the ids need to be separated by commas (avoid blanks between ids and commas).
- Parallelization degree: (mandatory) Defines the degree of parallelization that should be used. It is also possible to use the constant AUTO to detect the available cores and use this value, or GLOBAL to use the value defined in the #PARALLELIZATION keyword.
- Buffer-size: (mandatory) Defines the number of elements inside of the used buffers. There is also the possibility to use the constant AUTO to use an default value, or GLOBAL to use the value defined in the #PARALLELIZATION keyword.
- Parallelization strategy (optional): the parallelization strategy that should be used for the given operator ids. Otherwise the preferred strategy is automatically detected.
- Fragmentation type (optional): the fragmentation type the should be used inside of the strategy. Otherwise the preferred type is automatically selected.
The following code example shows the usage of this keyword. Only the aggregation is parallelized, because only this id is defined. The global parallelization degree is overwritten with the value of 2. With the constant GLOBAL the value for the buffersize is used from the global definition. In addition to this parameters, also the parallelization strategy is defined manually. In this case the AggregateMultithreadedTransformationStrategy is used. Note that the strategy need to be fit to the operator type defined with the id. In addition the strategy need to be compatible for the operator. In some cases it is not possible to use the selected strategy, e.g. an Grouping inside the aggregation is needed. The last parameter in this example is the optional selection of an fragmentation type. Note that also on this point not every strategy supports all fragmentation types. See the list below for all possible combinations.
Code Block |
---|
#PARSER PQL #PARALLELIZATION INTER_OPERATOR 4 AUTO #INTEROPERATORPARALLELIZATION aggregateId 2 GLOBAL AggregateMultithreadedTransformationStrategy ShuffleFragmentAO #RUNQUERY windowBid = TIMEWINDOW({SIZE = [1, 'MINUTES'], advance = [1, 'SECONDS'] }, bid) windowAuction = TIMEWINDOW({SIZE = [10, 'MINUTES'], advance = [1, 'SECONDS'] }, auction) join = JOIN({ID = 'joinId', PREDICATE = 'bid.bidder == auction.id'}, windowBid, windowAuction) sum_price_bidder = AGGREGATE({ID = 'aggregateId', aggregations = [ ['SUM', 'price', 'sum_price_bidder'] ], FASTGROUPING = true }, join ) |
Strategies and supported fragmentation types
Logical operator | Parallelization strategies | Description | Supported fragmentation types |
---|---|---|---|
JoinAO | JoinMultithreadedTransformationStrategy | Uses an Hash-Fragmentation for both input streams. The fragmentation attributes are gathered from the join attributes. Note that only equals-predicates (which are concatenated with &&) are supported. The fragmented datastream is merged with an UNION Operator. | HashFragmentAO |
AggregateAO | AggregateMultithreadedTransformationStrategy
| Uses an RoundRobin or Shuffle Fragmentation for split of the input datastream. This strategy works with partial aggregates and merges the datastream both with an union operator and an additional aggregate operator for merging the partial aggregates. This strategy works with and without grouping. Only aggregations with one input attribute are supported. | RoundRobinFragmentAO |
ShuffleFragmentAO | |||
GroupedAggregateMultithreadedTransformationStrategy | Uses a Hash-Fragmentation for the input stream. The fragmentation attributes are gathered from the grouping attributes. So this strategy only works if the aggregate operator has an grouping. The fragmented datastream is merged with an UNION Operator. | HashFragmentAO |
Info |
---|
Bold fragmentation types shows the preferred type if nothing is defined. |