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


##########
core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala:
##########
@@ -172,6 +180,18 @@ private[v1] class AbstractApplicationResource extends 
BaseAppResource {
     classOf[OneApplicationAttemptResource]
   }
 
+  private def checkExecutorId(execId: String): Unit = {
+    if (execId != SparkContext.DRIVER_IDENTIFIER && 
!execId.forall(Character.isDigit)) {
+      throw new BadParameterException(
+        s"Invalid executorId: neither '${SparkContext.DRIVER_IDENTIFIER}' nor 
number.")
+    }
+  }
+
+  private def checkAndGetSparkContext(): SparkContext = withUI { ui =>
+    ui.sc.getOrElse {
+      throw new ServiceUnavailable("Thread dumps not available through the 
history server.")
+    }
+  }

Review Comment:
   Thank you so much.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to