Skip to content

Commit 1c53ba9

Browse files
committed
SPARK-3276 Started to use ssc.conf rather than ssc.sparkContext.getConf, and also getLong method directly.
1 parent bfe0acb commit 1c53ba9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ class FileInputDStream[K, V, F <: NewInputFormat[K,V]](
8686
* Files with mod times older than this "window" of remembering will be ignored. So if new
8787
* files are visible within this window, then the file will get selected in the next batch.
8888
*/
89-
private val minRememberDurationMin = Minutes(ssc.sparkContext.getConf
90-
.get("spark.streaming.minRememberDurationMin", "1")
91-
.toLong)
89+
private val minRememberDurationMin = Minutes(ssc.conf
90+
.getLong("spark.streaming.minRememberDurationMin", 1L))
9291

9392
// This is a def so that it works during checkpoint recovery:
9493
private def clock = ssc.scheduler.clock

0 commit comments

Comments
 (0)