File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
streaming/src/main/scala/org/apache/spark/streaming/scheduler Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,13 @@ class JobGenerator(jobScheduler: JobScheduler) extends Logging {
4747 val clock = {
4848 val clockClass = ssc.sc.conf.get(
4949 " spark.streaming.clock" , " org.apache.spark.util.SystemClock" )
50- Class .forName(clockClass).newInstance().asInstanceOf [Clock ]
50+ try {
51+ Class .forName(clockClass).newInstance().asInstanceOf [Clock ]
52+ } catch {
53+ case e : ClassNotFoundException if clockClass.startsWith(" org.apache.spark.streaming" ) =>
54+ val newClockClass = clockClass.replace(" org.apache.spark.streaming" , " org.apache.spark" )
55+ Class .forName(newClockClass).newInstance().asInstanceOf [Clock ]
56+ }
5157 }
5258
5359 private val timer = new RecurringTimer (clock, ssc.graph.batchDuration.milliseconds,
You can’t perform that action at this time.
0 commit comments