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 2019/07/08 22:45:17 UTC

[GitHub] [spark] tdas commented on a change in pull request #24996: [SPARK-28199][SS] Replace deprecated ProcessingTime with ProcessingTimeTrigger and make invisible to end users

tdas commented on a change in pull request #24996: [SPARK-28199][SS] Replace deprecated ProcessingTime with ProcessingTimeTrigger and make invisible to end users
URL: https://github.com/apache/spark/pull/24996#discussion_r301330731
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Triggers.scala
 ##########
 @@ -27,3 +32,34 @@ import org.apache.spark.sql.streaming.Trigger
 @Experimental
 @Evolving
 case object OneTimeTrigger extends Trigger
+
+/**
+ * A [[Trigger]] that runs a query periodically based on the processing time. If `interval` is 0,
+ * the query will run as fast as possible.
+ */
+@Evolving
+private[sql] case class ProcessingTimeTrigger(intervalMs: Long) extends Trigger {
+  require(intervalMs >= 0, "the interval of trigger should not be negative")
+}
+
+private[sql] object ProcessingTimeTrigger {
 
 Review comment:
   Just a flyby comment (apologies if i am missing any prior context or conversation). I do not think it make sense to have both `OnTimeTrigger/ProcessingTimeTrigger` and `Trigger.OneTime/ProcessingTime` be public. The reason I had deprecated `ProcessingTime` constructor is so that we can reduce the number of public classes and move towards having everything through the `Trigger` class using`Trigger.ProcessingTime`. If we are indeed doing that, then we should have `Trigger.ProcessingTime` as the only public method and make `ProcessingTimeTrigger` private/hidden.
   
   

----------------------------------------------------------------
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