Skip to content

Commit f7ca221

Browse files
committed
Fix unit test
1 parent 8d4b276 commit f7ca221

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

kyuubi-server/src/main/scala/org/apache/kyuubi/server/metadata/api/Metadata.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ case class Metadata(
7878
engineState: String = null,
7979
engineError: Option[String] = None,
8080
endTime: Long = 0L,
81-
priority: Option[Int] = None,
81+
priority: Int = 10,
8282
peerInstanceClosed: Boolean = false) {
8383
def appMgrInfo: ApplicationManagerInfo = {
8484
ApplicationManagerInfo(

kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiBatchSession.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class KyuubiBatchSession(
179179
createTime = createTime,
180180
engineType = batchType,
181181
clusterManager = batchJobSubmissionOp.builder.clusterManager(),
182-
priority = conf.get(KYUUBI_BATCH_PRIORITY).map(_.toInt))
182+
priority = conf.get(KYUUBI_BATCH_PRIORITY).map(_.toInt).getOrElse(10))
183183

184184
// there is a chance that operation failed w/ duplicated key error
185185
sessionManager.insertMetadata(newMetadata)

kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class KyuubiSessionManager private (name: String) extends SessionManager(name) {
238238
requestArgs = batchRequest.getArgs.asScala.toSeq,
239239
createTime = System.currentTimeMillis(),
240240
engineType = batchRequest.getBatchType,
241-
priority = conf.get(KYUUBI_BATCH_PRIORITY).map(_.toInt))
241+
priority = conf.get(KYUUBI_BATCH_PRIORITY).map(_.toInt).getOrElse(10))
242242

243243
// there is a chance that operation failed w/ duplicated key error
244244
metadataManager.foreach(_.insertMetadata(metadata, asyncRetryOnError = false))

0 commit comments

Comments
 (0)