Skip to content

Commit

Permalink
add creator task running number limit
Browse files Browse the repository at this point in the history
  • Loading branch information
peacewong committed Nov 27, 2023
1 parent 39081ed commit 9ed39ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,12 @@ class EntranceFIFOUserConsumer(
CreatorECTypeDefaultConf.getCreatorECTypeMaxRunningJobs(creatorName, ecType)
if (logger.isDebugEnabled) {
logger.debug(
"Creator: {} EC: {} there are currently:{} jobs running and maximum limit: {}",
creatorName,
ecType,
creatorRunningJobNum,
creatorECTypeMaxRunningJobs
s"Creator: $creatorName EC:$ecType there are currently:$creatorRunningJobNum jobs running and maximum limit: $creatorECTypeMaxRunningJobs"
)
}
if (creatorRunningJobNum > creatorECTypeMaxRunningJobs) {
logger.error(
"Creator: {} EC: {} there are currently:{} jobs running that exceed the maximum limit: {}",
creatorName,
ecType,
creatorRunningJobNum,
creatorECTypeMaxRunningJobs
s"Creator: $creatorName EC:$ecType there are currently:$creatorRunningJobNum jobs running that exceed the maximum limit: $creatorECTypeMaxRunningJobs"
)
false
} else true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class EntranceParallelConsumerManager(maxParallelismUsers: Int, schedulerName: S

if (EntranceConfiguration.ENTRANCE_GROUP_SCAN_ENABLED.getValue) {
Utils.defaultScheduler.scheduleAtFixedRate(
() => {
Utils.tryAndError {
new Runnable {
override def run(): Unit = Utils.tryAndWarn {
// refresh all group maxAllowRunningJobs
refreshAllGroupMaxAllowRunningJobs(EntranceUtils.getRunningEntranceNumber())
logger.info("Finished to refresh consumer group maxAllowRunningJobs")
Expand Down

0 comments on commit 9ed39ef

Please sign in to comment.