GitHub user seyfe opened a pull request:
https://github.com/apache/spark/pull/15706
[SPARK-18189] [Core] Fix serialization issue in KeyValueGroupedDataset
## What changes were proposed in this pull request?
Likewise
[DataSet.scala](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala#L156)
KeyValueGroupedDataset should mark the queryExecution as transient.
As mentioned in the Jira ticket, without @transient we saw serialization
issues like
```
Caused by: java.io.NotSerializableException:
org.apache.spark.sql.execution.QueryExecution
Serialization stack:
- object not serializable (class:
org.apache.spark.sql.execution.QueryExecution, value: ==
```
## How was this patch tested?
Run the query which is specified in the Jira ticket before and after:
```
val a =
spark.createDataFrame(sc.parallelize(Seq((1,2),(3,4)))).as[(Int,Int)]
val grouped = a.groupByKey(
{x:(Int,Int)=>x._1}
)
val mappedGroups = grouped.mapGroups((k,x)=>
{(k,1)}
)
val yyy = sc.broadcast(1)
val last = mappedGroups.rdd.map(xx=>
{ val simpley = yyy.value 1 }
)
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/seyfe/spark keyvaluegrouped_serialization
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15706.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15706
----
commit 07160b93130ba58c29e516368354fea86e5e8865
Author: Ergin Seyfe <[email protected]>
Date: 2016-11-01T00:02:35Z
Make queryExecution transient for KeyValueGroupedDataset
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]