Skip to content

Commit

Permalink
code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
aiceflower committed Dec 17, 2024
1 parent ef4e19e commit 635643f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import org.apache.linkis.governance.common.utils.LoggerUtils
import org.apache.linkis.protocol.constants.TaskConstant
import org.apache.linkis.protocol.utils.TaskUtils
import org.apache.linkis.rpc.Sender
import org.apache.linkis.scheduler.conf.SchedulerConfiguration.{ENGINE_PRIORITY_RUNTIME_KEY, FIFO_QUEUE_STRATEGY}
import org.apache.linkis.scheduler.conf.SchedulerConfiguration.{ENGINE_PRIORITY_RUNTIME_KEY, FIFO_QUEUE_STRATEGY, PFIFO_SCHEDULER_STRATEGY}
import org.apache.linkis.scheduler.queue.{Job, SchedulerEventState}
import org.apache.linkis.server.conf.ServerConfiguration

Expand Down Expand Up @@ -174,9 +174,8 @@ abstract class EntranceServer extends Logging {
Utils.tryAndWarn{
// 如果是使用优先级队列,设置下优先级
val properties: util.Map[String, AnyRef] = TaskUtils.getRuntimeMap(params)
val PFIFO = "pfifo"
val fifoStrategy: String = FIFO_QUEUE_STRATEGY
if (PFIFO.equalsIgnoreCase(fifoStrategy) && properties != null && !properties.isEmpty) {
if (PFIFO_SCHEDULER_STRATEGY.equalsIgnoreCase(fifoStrategy) && properties != null && !properties.isEmpty) {
val priorityValue: AnyRef = properties.get(ENGINE_PRIORITY_RUNTIME_KEY)
if (priorityValue != null) {
val value: Int = priorityValue.toString.toInt
Expand Down

0 comments on commit 635643f

Please sign in to comment.