spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] HeartSaVioR commented on a change in pull request #26201: [SPARK-29543][SS][UI] Init structured streaming ui
Date Tue, 22 Oct 2019 22:19:25 GMT
HeartSaVioR commented on a change in pull request #26201: [SPARK-29543][SS][UI] Init structured
streaming ui
URL: https://github.com/apache/spark/pull/26201#discussion_r337763077
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
 ##########
 @@ -110,6 +111,11 @@ private[sql] class SharedState(
    */
   val cacheManager: CacheManager = new CacheManager
 
+  /**
+   * Class for caching streaming query instance.
+   */
+  val streamingQueryCache = new mutable.HashSet[(StreamingQuery, Long)]
 
 Review comment:
   I wouldn't assume StreamingQuery is eligible to be compared. It's a trait - nothing is
guaranteed. And you're adding System.currentTimeMillis as well. Have you checked that this
HashSet works as you intended?
   
   `runId` would be enough to deduplicate (and also available in trait level), so `mutable.HashMap[UUID,
StreamingQuery]` should serve your purpose well.

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


Mime
View raw message