Skip to content

Commit

Permalink
enum
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Dec 22, 2023
1 parent bc479e6 commit 557714e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co
| kyuubi.session.engine.log.timeout | PT24H | If we use Spark as the engine then the session submit log is the console output of spark-submit. We will retain the session submit log until over the config value. | duration | 1.1.0 |
| kyuubi.session.engine.login.timeout | PT15S | The timeout of creating the connection to remote sql query engine | duration | 1.0.0 |
| kyuubi.session.engine.open.max.attempts | 9 | The number of times an open engine will retry when encountering a special error. | int | 1.7.0 |
| kyuubi.session.engine.open.reset.onFailure | false | Whether to reset the engine ref with existing engine host and port before retrying to open the engine after failure. | boolean | 1.8.1 |
| kyuubi.session.engine.open.onFailure | RETRY | The behavior when opening engine failed. RETRY: retry to open engine for ENGINE_OPEN_MAX_ATTEMPTS times. DEREGISTER_IMMEDIATELY: deregister the session immediately. DEREGISTER_AFTER_RETRY: deregister the session after retry to open engine for ENGINE_OPEN_MAX_ATTEMPTS times. | string | 1.8.1 |
| kyuubi.session.engine.open.retry.wait | PT10S | How long to wait before retrying to open the engine after failure. | duration | 1.7.0 |
| kyuubi.session.engine.share.level | USER | (deprecated) - Using kyuubi.engine.share.level instead | string | 1.0.0 |
| kyuubi.session.engine.spark.initialize.sql || The initialize sql for Spark session. It fallback to `kyuubi.engine.session.initialize.sql` | seq | 1.8.1 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.apache.kyuubi.KyuubiSQLException
import org.apache.kyuubi.client.KyuubiSyncThriftClient
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.config.KyuubiConf._
import org.apache.kyuubi.config.KyuubiConf.EngineOpenOnFailure._
import org.apache.kyuubi.config.KyuubiReservedKeys.{KYUUBI_ENGINE_CREDENTIALS_KEY, KYUUBI_SESSION_HANDLE_KEY, KYUUBI_SESSION_SIGN_PUBLICKEY, KYUUBI_SESSION_USER_SIGN}
import org.apache.kyuubi.engine.{EngineRef, KyuubiApplicationManager}
import org.apache.kyuubi.events.{EventBus, KyuubiSessionEvent}
Expand Down Expand Up @@ -179,7 +180,7 @@ class KyuubiSessionImpl(
e.getCause)
Thread.sleep(retryWait)
openOnFailure match {
case EngineOpenOnFailure.DEREGISTER_IMMEDIATELY => deregisterEngine()
case DEREGISTER_IMMEDIATELY => deregisterEngine()
case _ =>
}
shouldRetry = true
Expand All @@ -190,8 +191,8 @@ class KyuubiSessionImpl(
e)
openSessionError = Some(e)
openOnFailure match {
case EngineOpenOnFailure.DEREGISTER_IMMEDIATELY | EngineOpenOnFailure.DEREGISTER_AFTER_RETRY =>
deregisterEngine()
case DEREGISTER_IMMEDIATELY | DEREGISTER_AFTER_RETRY => deregisterEngine()
case _ =>
}
throw e
} finally {
Expand Down

0 comments on commit 557714e

Please sign in to comment.