pan3793 commented on code in PR #6572: URL: https://github.com/apache/kyuubi/pull/6572#discussion_r1726686327
########## extensions/spark/kyuubi-spark-jvm-quake/src/main/scala/org/apache/spark/kyuubi/jvm/quake/SparkJVMQuakeConf.scala: ########## @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.kyuubi.jvm.quake + +import java.util.concurrent.TimeUnit + +import org.apache.spark.internal.config.ConfigBuilder + +object SparkJVMQuakeConf { + + val DRIVER_JVM_QUAKE_ENABLED = + ConfigBuilder("spark.driver.jvmQuake.enabled") + .doc("when true, Spark driver will start jvm quake and begin detecting JVM exceptions") + .version("1.10.0") + .booleanConf + .createWithDefault(false) + + val EXECUTOR_JVM_QUAKE_ENABLED = + ConfigBuilder("spark.executor.jvmQuake.enabled") + .doc("when true, Spark executor will start jvm quake and begin detecting JVM exceptions") + .version("1.10.0") + .booleanConf + .createWithDefault(false) + + val DRIVER_JVM_QUAKE_HEAP_DUMP_ENABLED = + ConfigBuilder("spark.driver.jvmQuake.heapDump.enabled") + .doc(s"when true, When the driver jvm quake reaches the ${JVM_QUAKE_KILL_THRESHOLD.key} " + + s"threshold, dump the memory to ${JVM_QUAKE_HEAP_DUMP_PATH.key}") + .version("1.10.0") + .booleanConf + .createWithDefault(false) + + val EXECUTOR_JVM_QUAKE_HEAP_DUMP_ENABLED = + ConfigBuilder("spark.executor.jvmQuake.heapDump.enabled") + .doc(s"when true, When the executor jvm quake reaches the ${JVM_QUAKE_KILL_THRESHOLD.key} " + + s"threshold, dump the memory to ${JVM_QUAKE_HEAP_DUMP_PATH.key}") + .version("1.10.0") + .version("1.10.0") + .booleanConf + .createWithDefault(false) + + val JVM_QUAKE_CHECK_INTERVAL = + ConfigBuilder("spark.jvmQuake.checkInterval") + .doc("How often will jvm quake check") + .version("1.10.0") + .timeConf(TimeUnit.SECONDS) + .createWithDefault(3) + + val JVM_QUAKE_KILL_THRESHOLD = + ConfigBuilder("spark.jvmQuake.killThreshold") + .doc("When the jvm quake reaches this threshold, " + + "kill process and dump heap if dump is enabled") + .version("1.10.0") + .timeConf(TimeUnit.SECONDS) + .createWithDefault(200) + + val JVM_QUAKE_EXIT_CODE = + ConfigBuilder("spark.jvmQuake.exitCode") + .doc("Exit code for jvm quake kill") + .version("1.10.0") + .intConf + .createWithDefault(502) Review Comment: why 502 is chosen? I remember the max allowed exit code is 255 -- 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: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org