ulysses-you commented on a change in pull request #1330:
URL: https://github.com/apache/incubator-kyuubi/pull/1330#discussion_r742875016
##########
File path:
tools/spark-block-cleaner/src/main/scala/org/apache/kyuubi/tools/KubernetesSparkBlockCleaner.scala
##########
@@ -154,13 +154,20 @@ object KubernetesSparkBlockCleaner extends Logging {
import scala.sys.process._
private def needToDeepClean(dir: String): Boolean = {
- val used = (s"df $dir" #| s"grep $dir").!!
- .split(" ").filter(_.endsWith("%")) {
- 0
- }.replace("%", "")
- info(s"$dir now used $used% space")
-
- used.toInt > (100 - freeSpaceThreshold)
+ try {
+ val used = (s"df $dir" #| s"grep $dir").!!
+ .split(" ").filter(_.endsWith("%")) {
+ 0
+ }.replace("%", "")
+ info(s"$dir now used $used% space")
+
+ used.toInt > (100 - freeSpaceThreshold)
+ } catch {
+ case e: RuntimeException =>
Review comment:
how about catch `NonFatal` ?
--
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]