Hi All,
I'm running a streaming application, the application should send an
output to an external source
This piece of code send the Dstream to graphite.
streamDataRow.foreachRDD { rdd =>
rdd.foreachPartition { partitionOfRecords =>
val graphite = new GraphiteClient(new InetSocketAddress(*IP*, *PORT*))
partitionOfRecords.foreach(record => graphite.send(record._1,
record._2.toString, System.currentTimeMillis()/1000) )
graphite.close()
}
}
where streamDataRow is a Dstream
The appliction throw an exception :
"NotSerializableException: DStream checkpointing has been enabled but the
DStreams with their functions are not serializable"
The GraphiteClient is defined in another place ( I understood it might be
the problem ) , but I have trouble to understand how to make this class and
its methods serialize
Thanks !
--
*This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are
addressed. Please note that any disclosure, copying or distribution of the
content of this information is strictly forbidden. If you have received
this email message in error, please destroy it immediately and notify its
sender.*