runzhiwang commented on a change in pull request #242: [LIVY-336] Livy should 
not spawn one thread per job to track the job on Yarn
URL: https://github.com/apache/incubator-livy/pull/242#discussion_r333407101
 
 

 ##########
 File path: server/src/main/scala/org/apache/livy/utils/SparkYarnApp.scala
 ##########
 @@ -98,7 +112,33 @@ object SparkYarnApp extends Logging {
     }
   }
 
-
+  private val yarnAppMonitorThread = new Thread() {
+    override def run() : Unit = {
+      val executor = Executors.newSingleThreadExecutor
+      while (true) {
+        for (app <- appList) {
+          val handler = executor.submit(new Runnable {
 
 Review comment:
   The Scala Future thread cannot be interrupted when timeout, which maybe 
caused by rpc call.
   https://stackoverflow.com/questions/16009837/how-to-cancel-future-in-scala

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to