spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akhil <>
Subject Re: serialization issue with mapPartitions
Date Fri, 26 Dec 2014 11:22:08 GMT
You cannot pass your jobConf object inside any of the transformation function
in spark (like map, mapPartitions, etc.) since 
 org.apache.hadoop.mapreduce.Job is not Serializable. You can use
KryoSerializer (See this doc, We
usually converts the JobConf into ByteArray and pass over the byteArray
object inside the map and from there we creates the jobConf (new variable)
with the data inside byteArray object.

> I should rephrase my question as follows:
> How to use the corresponding Hadoop Configuration of a HadoopRDD in
> defining a function as an input parameter to the MapPartitions function?
> Thanks.
> Ey-Chih Chow

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message