You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "zhongqiangczq (via GitHub)" <gi...@apache.org> on 2023/05/05 03:03:29 UTC

[GitHub] [incubator-celeborn] zhongqiangczq commented on a diff in pull request #1457: [CELEBORN-552] Add HeartBeat between the client and worker to keep alive

zhongqiangczq commented on code in PR #1457:
URL: https://github.com/apache/incubator-celeborn/pull/1457#discussion_r1185663282


##########
tests/flink-it/src/test/scala/org/apache/celeborn/tests/flink/WordCountTest.scala:
##########
@@ -22,21 +22,32 @@ import org.apache.flink.configuration.{ConfigConstants, Configuration, Execution
 import org.apache.flink.runtime.jobgraph.JobType
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
 import org.apache.flink.streaming.api.graph.GlobalStreamExchangeMode
-import org.scalatest.BeforeAndAfterAll
+import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
 import org.scalatest.funsuite.AnyFunSuite
 
 import org.apache.celeborn.common.internal.Logging
-import org.apache.celeborn.service.deploy.MiniClusterFeature;
+import org.apache.celeborn.plugin.flink.readclient.FlinkShuffleClientImpl
+import org.apache.celeborn.service.deploy.MiniClusterFeature
+import org.apache.celeborn.service.deploy.worker.memory.MemoryManager;
 
 class WordCountTest extends AnyFunSuite with Logging with MiniClusterFeature
-  with BeforeAndAfterAll {
+  with BeforeAndAfterAll with BeforeAndAfterEach {
+
+  override def beforeEach(): Unit = {
+    FlinkShuffleClientImpl.reset()
+  }
+
+  override def afterEach(): Unit = {
+    System.gc()
+  }
 
   override def beforeAll(): Unit = {
     logInfo("test initialized , setup rss mini cluster")
     val masterConf = Map(
       "celeborn.master.host" -> "localhost",
       "celeborn.master.port" -> "9097")
     val workerConf = Map("celeborn.master.endpoints" -> "localhost:9097")
+    MemoryManager.reset()

Review Comment:
   Both WordCountTest and HeartbeatTest start different miniclusters in a process. MemoryManager is process level instance, so if `MemoryManager.reset()` can't be called, WordCountTest and HeartbeatTest use the same MemoryManager instance resulting that WordCountTest or  HeartbeatTest has no enough memory after starting minicluster



-- 
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: issues-unsubscribe@celeborn.apache.org

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