HeartSaVioR commented on a change in pull request #26771: [SPARK-30143][SS] Add
a timeout on stopping a streaming query
URL: https://github.com/apache/spark/pull/26771#discussion_r355153971
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -1258,6 +1258,14 @@ object SQLConf {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefault(10L)
+ val STREAMING_STOP_TIMEOUT =
+ buildConf("spark.sql.streaming.stopTimeout")
+ .doc("How long to wait for the streaming execution thread to stop when
calling the " +
+ "streaming query's stop() method in milliseconds. 0 means to wait
infinitely. Setting a " +
Review comment:
I'm sorry, but I'm not sure I got your point about "harder to debug".
`checkValue` can leave an error message, and it also throws
IllegalArgumentException. The customized error message would be clearer, as we
don't modify the error message of IllegalArgumentException given from
Thread.join() which doesn't explain about the configuration.
Also while stop() will throw IllegalArgumentException, while the method has
no parameter which is feeling odd (given the exception comes from Thread.join
with parameter), and the method still does the thing even it throws
IllegalArgumentException - that does interrupt the thread. It's effectively not
different with TimeoutException. If we still want to throw exception when stop
is called, I'd rather check the value and don't call join and throw
TimeoutException directly - it will at least explain about bad configuration.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]