You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:12:26 UTC
[jira] [Resolved] (SPARK-18978) Spark streaming ClassCastException
[ https://issues.apache.org/jira/browse/SPARK-18978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-18978.
----------------------------------
Resolution: Incomplete
> Spark streaming ClassCastException
> ----------------------------------
>
> Key: SPARK-18978
> URL: https://issues.apache.org/jira/browse/SPARK-18978
> Project: Spark
> Issue Type: Bug
> Reporter: Keltoum BOUQOUROU
> Priority: Major
> Labels: bulk-closed
>
> I use Spark Streaming as a listener to monitor a directory. When a new file is detected, the program performs a processing on the file. The program is the following:
> val conf = new SparkConf().setAppName("DocumentRanking").setMaster("local[*]")
> val sparkStreamingContext = new StreamingContext(conf, Seconds(5))
> val directoryStream =sparkStreamingContext.textFileStream("nom_dossier")
> directoryStream.foreachRDD (rdd => if (rdd.count()!=0)
> rdd.foreach(line =>traitement()))
> The processing of the first file added passes without problems. But with the addition of the second file, I have the following error:
> 16/12/22 09:11:37 ERROR Executor: Exception in task 0.0 in stage 2.0 (TID 2)
> java.lang.ClassCastException: org.apache.spark.util.SerializableConfiguration cannot be cast to [B
> at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:62)
> at org.apache.spark.scheduler.Task.run(Task.scala:88)
> at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org