You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/11/25 12:52:46 UTC

[GitHub] [incubator-livy] yiheng commented on a change in pull request #242: [LIVY-336][SERVER] Livy should not spawn one thread per job to track the job on Yarn

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

 ##########
 File path: server/src/main/scala/org/apache/livy/utils/SparkYarnApp.scala
 ##########
 @@ -311,15 +322,22 @@ class SparkYarnApp private[utils] (
         }
       }
 
+      yarnTagToAppIdFailedTimes = 0
+
       debug(s"$appId $state ${yarnDiagnostics.mkString(" ")}")
     } catch {
-      case _: InterruptedException =>
-        yarnDiagnostics = ArrayBuffer("Session stopped by user.")
-        changeState(SparkApp.State.KILLED)
+      // throw IllegalStateException when getAppId failed
+      case e: IllegalStateException =>
+        yarnTagToAppIdFailedTimes += 1
+        if (yarnTagToAppIdFailedTimes > getYarnTagToAppIdMaxFailedTimes(livyConf)) {
 
 Review comment:
   why not read the value into a class varaible first?

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