Hi,
I would like to knot how the Flink cross function works. I found that there are four strategies ( NESTEDLOOP_BLOCKED_OUTER_FIRST, NESTEDLOOP_BLOCKED_OUTER_SECOND, NESTEDLOOP_STREAMED_OUTER_FIRST, NESTEDLOOP_STREAMED_OUTER_SECOND), but I need some more detailed explanations please. Thanks |
Hi, first of all, Cross is a *very* expensive operation, if you cannot ensure that one side is very small. If one input fits into memory, it is usually better to use a MapFunction with a broadcast set. If both sides can be large, Cross will take a very long time.- NESTEDLOOP_STREAMED_OUTER_FIRS The benefit of the blocked strategy is that we only iterate once per block over the inner side and not for each individual records as the streamed strategy does. However, the blocked variant destroys the order of the outer side. Best, Fabian 2017-04-04 11:21 GMT+02:00 gen-too <[hidden email]>: Hi, |
Hi Fabian,
thanks for your answer! How does Flink select the cross strategy? For a better understanding for my part maybe we can assume the following example scenario: I have two DataSets consisting of 6000 and 4000 records (stored as files in HDFS) and I want to do the cross operation. Lets say that I have a parallelism of 2, then how is the general work flow? Thanks in advance Am 05.04.2017 um 09:56 schrieb Fabian
Hueske:
|
The DataSet API has three methods: - cross()The local join will be either streamed with the smaller input being on the inner side or blocked with the smaller input being the outer side. Whether the streamed or blocked strategy is chosen depends on whether the plan can leverage the preserved sort order of the outer side. Best, Fabian 2017-04-05 11:17 GMT+02:00 gen-too <[hidden email]>:
|
Free forum by Nabble | Edit this page |