[
https://issues.apache.org/jira/browse/SPARK-22552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
sachin malhotra updated SPARK-22552:
------------------------------------
Description:
When unioning multiple kafka streams I learned that the resulting dataframe
only contains the data that exists in the dataframe that initiated the union
i.e. if df1.union(df2) (or a chaining of unions) the result will only contain
the rows that exist in df1.
Now to be more specific this occurs when data comes in during the same
micro-batch for all three streams. If you wait for each single row to be
processed for each stream the union does return the right results.
was:
When unioning multiple kafka streams I learned that the resulting dataframe
only contains the data that exists in the dataframe that initiated the union
i.e. if df1.union(df2) (or a chaining of unions) the result will only contain
the rows that exist in df1.
Now to be more specific this occurs when data comes in during the same
micro-batch for all three streams. If you wait for each single row to be
processed for each stream the union does return the right results.
After debugging with waiting/not waiting for the rows to be processed this is
what I found when looking at the dag scheduler submitting jobs:
Waiting for rows to be processed:(These are 3 partitions of union RDD type)
Job 0 - each partition does a projection
Job 1 - first partition: projection , second partition: local table scan ,
third partition: local table scan
Job 2- first partition: local table scan, second partition: projection , third
partition: local table scan
Job 3- first partition: local table scan, second partition: local table scan,
third partition: projection
Returns correct dataframe with all rows unioned, after three micro-batches.
Not waiting for rows to be processed:(These are 3 partitions of union RDD type)
Job 0 - each partition does a projection
Job 1 - first partition: projection , second partition: local table scan ,
third partition: local table scan
Does not return correct dataframe with all rows union, only returns the first
dataframes rows after one micro-batch and not waiting
> Cannot Union multiple kafka streams
> -----------------------------------
>
> Key: SPARK-22552
> URL: https://issues.apache.org/jira/browse/SPARK-22552
> Project: Spark
> Issue Type: Bug
> Components: Structured Streaming
> Affects Versions: 2.2.0
> Reporter: sachin malhotra
> Assignee: Shixiong Zhu
> Fix For: 2.3.0, 2.2.2
>
>
> When unioning multiple kafka streams I learned that the resulting dataframe
> only contains the data that exists in the dataframe that initiated the union
> i.e. if df1.union(df2) (or a chaining of unions) the result will only contain
> the rows that exist in df1.
> Now to be more specific this occurs when data comes in during the same
> micro-batch for all three streams. If you wait for each single row to be
> processed for each stream the union does return the right results.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]