You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/17 13:12:15 UTC
[GitHub] [spark] xuanyuanking commented on a change in pull request #27664:
[SPARK-30915][SS] FileStreamSink: Avoid reading the metadata log file when
finding the latest batch ID
xuanyuanking commented on a change in pull request #27664: [SPARK-30915][SS] FileStreamSink: Avoid reading the metadata log file when finding the latest batch ID
URL: https://github.com/apache/spark/pull/27664#discussion_r410212174
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala
##########
@@ -142,7 +142,7 @@ class FileStreamSink(
}
override def addBatch(batchId: Long, data: DataFrame): Unit = {
- if (batchId <= fileLog.getLatest().map(_._1).getOrElse(-1L)) {
Review comment:
Nice catch!
https://github.com/apache/spark/blob/7ad6ba36f28b7a5ca548950dec6afcd61e5d68b9/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/CompactibleFileStreamLog.scala#L196
https://github.com/apache/spark/blob/7ad6ba36f28b7a5ca548950dec6afcd61e5d68b9/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSourceLog.scala#L99
Can these two places also be optimized in this way?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org