Skip to content

Commit

Permalink
Fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
peacewong committed Nov 27, 2023
1 parent dfb7faf commit 39081ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

package org.apache.linkis.entrance.scheduler

import org.apache.linkis.common.utils.Utils
import org.apache.linkis.common.utils.{Logging, Utils}
import org.apache.linkis.entrance.conf.EntranceConfiguration
import org.apache.linkis.entrance.job.EntranceExecutionJob
import org.apache.linkis.entrance.utils.JobHistoryHelper
import org.apache.linkis.scheduler.SchedulerContext
import org.apache.linkis.scheduler.queue.{Consumer, Group}
import org.apache.linkis.scheduler.queue.Group
import org.apache.linkis.scheduler.queue.fifoqueue.FIFOUserConsumer

import java.util
Expand All @@ -34,7 +34,8 @@ class EntranceFIFOUserConsumer(
schedulerContext: SchedulerContext,
executeService: ExecutorService,
private var group: Group
) extends FIFOUserConsumer(schedulerContext, executeService, group) {
) extends FIFOUserConsumer(schedulerContext, executeService, group)
with Logging {

override def loop(): Unit = {
// When offlineFlag=true, the unsubmitted tasks will be failover, and the running tasks will wait for completion.
Expand Down Expand Up @@ -83,19 +84,21 @@ class EntranceFIFOUserConsumer(
val ecType = groupNames(length - 1)
for (consumer <- consumers) {
val groupName = consumer.getGroup.getGroupName
if (groupName.startsWith(creatorName) && groupName.endsWith(ecType))
if (groupName.startsWith(creatorName) && groupName.endsWith(ecType)) {
creatorRunningJobNum += consumer.getRunningEvents.length
}
}
val creatorECTypeMaxRunningJobs =
CreatorECTypeDefaultConf.getCreatorECTypeMaxRunningJobs(creatorName, ecType)
if (logger.isDebugEnabled)
if (logger.isDebugEnabled) {
logger.debug(
"Creator: {} EC: {} there are currently:{} jobs running and maximum limit: {}",
creatorName,
ecType,
creatorRunningJobNum,
creatorECTypeMaxRunningJobs
)
}
if (creatorRunningJobNum > creatorECTypeMaxRunningJobs) {
logger.error(
"Creator: {} EC: {} there are currently:{} jobs running that exceed the maximum limit: {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,9 @@ public class LabelKeyConstant {

public static final String ENGINGE_CONN_RUNTIME_MODE_KEY = "engingeConnRuntimeMode";

public static final String TEMPLATE_CONF_KEY = "ec.conf.templateId";

public static final String TEMPLATE_CONF_NAME_KEY = "ec.resource.name";

public static final String MANAGER_KEY = "manager";
}

0 comments on commit 39081ed

Please sign in to comment.