Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20441][SPARK-20432][SS] Within the same streaming query, one StreamingRelation should only be transformed to one StreamingExecutionRelation - #17735
Conversation
SparkQA
commented
Apr 23, 2017
Test build #76080 has finished for PR 17735 at commit
|
lw-lin
commented
Apr 25, 2017
| .collect { case ser: StreamingExecutionRelation => ser } | ||
| assert(executionRelations.size == 2) | ||
| assert(executionRelations.distinct.size == 1) | ||
| query.stop() |
There was a problem hiding this comment.
can you please wrap this in a finally?
SparkQA
commented
Apr 27, 2017
Test build #76208 has finished for PR 17735 at commit
|
SparkQA
commented
Apr 27, 2017
Test build #76211 has finished for PR 17735 at commit
|
@brkyvz please take another look |
lw-lin
commented
May 1, 2017
Jenkins retest this please |
lw-lin
commented
May 1, 2017
SparkQA
commented
May 1, 2017
Test build #76347 has finished for PR 17735 at commit
|
lw-lin
commented
May 1, 2017
Jenkins retest this please |
SparkQA
commented
May 2, 2017
Test build #76363 has finished for PR 17735 at commit
|
| .streamingQuery | ||
| val executionRelations = | ||
| query | ||
| .logicalPlan |
There was a problem hiding this comment.
you need to call query.awaitInitialization before accessing logicalPlan. Otherwise this test will be flaky.
zsxwing
commented
May 2, 2017
Looks pretty good except one minor issue in tests. |
SparkQA
commented
May 3, 2017
Test build #76398 has finished for PR 17735 at commit
|
brkyvz
commented
May 3, 2017
LGTM. Merging to master/2.2. Thanks for the PR! |
…treamingRelation should only be transformed to one StreamingExecutionRelation ## What changes were proposed in this pull request? Within the same streaming query, when one `StreamingRelation` is referred multiple times – e.g. `df.union(df)` – we should transform it only to one `StreamingExecutionRelation`, instead of two or more different `StreamingExecutionRelation`s (each of which would have a separate set of source, source logs, ...). ## How was this patch tested? Added two test cases, each of which would fail without this patch. Author: Liwei Lin <lwlin7@gmail.com> Closes#17735 from lw-lin/SPARK-20441. (cherry picked from commit 27f543b) Signed-off-by: Burak Yavuz <brkyvz@gmail.com>
…treamingRelation should only be transformed to one StreamingExecutionRelation ## What changes were proposed in this pull request? Within the same streaming query, when one `StreamingRelation` is referred multiple times – e.g. `df.union(df)` – we should transform it only to one `StreamingExecutionRelation`, instead of two or more different `StreamingExecutionRelation`s (each of which would have a separate set of source, source logs, ...). ## How was this patch tested? Added two test cases, each of which would fail without this patch. Author: Liwei Lin <lwlin7@gmail.com> Closesapache#17735 from lw-lin/SPARK-20441. (cherry picked from commit 27f543b) Signed-off-by: Burak Yavuz <brkyvz@gmail.com> (cherry picked from commit b1a732f)
…treamingRelation should only be transformed to one StreamingExecutionRelation ## What changes were proposed in this pull request? Within the same streaming query, when one `StreamingRelation` is referred multiple times – e.g. `df.union(df)` – we should transform it only to one `StreamingExecutionRelation`, instead of two or more different `StreamingExecutionRelation`s (each of which would have a separate set of source, source logs, ...). ## How was this patch tested? Added two test cases, each of which would fail without this patch. Author: Liwei Lin <lwlin7@gmail.com> Closesapache#17735 from lw-lin/SPARK-20441. (cherry picked from commit 27f543b)
| // "df.logicalPlan" has already used attributes of the previous `output`. | ||
| StreamingExecutionRelation(source, output) | ||
| case streamingRelation@StreamingRelation(dataSource, _, output) => | ||
| toExecutionRelationMap.getOrElseUpdate(streamingRelation, { |
What changes were proposed in this pull request?
Within the same streaming query, when one
StreamingRelationis referred multiple times – e.g.df.union(df)– we should transform it only to oneStreamingExecutionRelation, instead of two or more differentStreamingExecutionRelations (each of which would have a separate set of source, source logs, ...).How was this patch tested?
Added two test cases, each of which would fail without this patch.