HeartSaVioR commented on code in PR #38517:
URL: https://github.com/apache/spark/pull/38517#discussion_r1052927996
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/AsyncProgressTrackingMicroBatchExecutionSuite.scala:
##########
@@ -78,7 +72,9 @@ class AsyncProgressTrackingMicroBatchExecutionSuite
test("async WAL commits happy path") {
val checkpointLocation = Utils.createTempDir(namePrefix =
"streaming.metadata").getCanonicalPath
- val inputData = new MemoryStream[Int](id = 0, sqlContext = sqlContext)
+// val inputData = new MemoryStream[Int](id = 0, sqlContext = sqlContext)
Review Comment:
nit: remove comment
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/AsyncProgressTrackingMicroBatchExecution.scala:
##########
@@ -283,3 +264,23 @@ class AsyncProgressTrackingMicroBatchExecution(
}
}
}
+
+object AsyncProgressTrackingMicroBatchExecution {
+ val ASYNC_PROGRESS_TRACKING_ENABLED = "asyncProgressTrackingEnabled"
+ val ASYNC_PROGRESS_TRACKING_CHECKPOINTING_INTERVAL_MS =
+ "asyncProgressTrackingCheckpointIntervalMs"
+
+ // for testing purposes
+ val ASYNC_PROGRESS_TRACKING_OVERRIDE_SINK_SUPPORT_CHECK =
+ "_asyncProgressTrackingOverrideSinkSupportCheck"
+
+ private def getAsyncProgressTrackingCheckpointingIntervalMs(
+ extraOptions:
Map[String, String]): Long = {
Review Comment:
nit: indentation is off
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/AsyncProgressTrackingMicroBatchExecution.scala:
##########
@@ -157,8 +172,17 @@ class AsyncProgressTrackingMicroBatchExecution(
watermarkTracker.updateWatermark(lastExecution.executedPlan)
reportTimeTaken("commitOffsets") {
// check if current batch there is a async write for the offset log is
issued for this batch
- // if so, we should do the same for commit log
- if (offsetLog.getAsyncOffsetWrite(currentBatchId).nonEmpty) {
+ // if so, we should do the same for commit log. However, if this is the
first batch executed
+ // in this run we should always persis to the commit log. There can be
situations in which
Review Comment:
nit: persist
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]