dongjoon-hyun commented on code in PR #39385:
URL: https://github.com/apache/spark/pull/39385#discussion_r1062012515


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala:
##########
@@ -1007,6 +1004,36 @@ class SQLAppStatusListenerSuite extends 
SharedSparkSession with JsonTestUtils
   }
 }
 
+class SQLAppStatusListenerWithInMemoryStoreSuite extends 
SQLAppStatusListenerSuite {
+  override protected def createStatusStore(): SQLAppStatusStore = {
+    val conf = sparkContext.conf
+    kvstore = new ElementTrackingStore(new InMemoryStore, conf)
+    val listener = new SQLAppStatusListener(conf, kvstore, live = true)
+    new SQLAppStatusStore(kvstore, Some(listener))
+  }
+}
+class SQLAppStatusListenerWithRocksDBBackendSuite extends 
SQLAppStatusListenerSuite {
+
+  // TODO: SPARK-41882 remove this field after RocksDB can automatically 
cleanup

Review Comment:
   Use a new real JIRA ID with `IDed TODO` style.



##########
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala:
##########
@@ -1007,6 +1004,36 @@ class SQLAppStatusListenerSuite extends 
SharedSparkSession with JsonTestUtils
   }
 }
 
+class SQLAppStatusListenerWithInMemoryStoreSuite extends 
SQLAppStatusListenerSuite {
+  override protected def createStatusStore(): SQLAppStatusStore = {
+    val conf = sparkContext.conf
+    kvstore = new ElementTrackingStore(new InMemoryStore, conf)
+    val listener = new SQLAppStatusListener(conf, kvstore, live = true)
+    new SQLAppStatusStore(kvstore, Some(listener))
+  }
+}
+class SQLAppStatusListenerWithRocksDBBackendSuite extends 
SQLAppStatusListenerSuite {
+
+  // TODO: SPARK-41882 remove this field after RocksDB can automatically 
cleanup
+  private var storePath: File = _
+  override protected def createStatusStore(): SQLAppStatusStore = {
+    val conf = sparkContext.conf
+    storePath = Utils.createTempDir()
+    conf.set(LIVE_UI_LOCAL_STORE_DIR, storePath.getCanonicalPath)
+    val appStatusStore = AppStatusStore.createLiveStore(conf)
+    kvstore = appStatusStore.store.asInstanceOf[ElementTrackingStore]
+    val listener = new SQLAppStatusListener(conf, kvstore, live = true)
+    new SQLAppStatusStore(kvstore, Some(listener))
+  }
+
+  // TODO: SPARK-41882 remove this method after RocksDB can automatically 
cleanup

Review Comment:
   ditto.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to