Skip to content

Commit

Permalink
fix compile bug (#266)
Browse files Browse the repository at this point in the history
Co-authored-by: aiceflower <[email protected]>
  • Loading branch information
casionone and aiceflower authored Aug 31, 2023
1 parent 3cefd84 commit f385cd8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ class DefaultEngineConnResourceService extends EngineConnResourceService with Lo
lock = commonLockService.reentrantLock(commonLock, -1)
if (lock) {
logger.info(
"The master LinkisManager node get lock by {}-{}. And start to refresh all engineconn plugins when inited.",
_LOCK,
commonLock.getCreator
"The master LinkisManager node get lock by {}. And start to refresh all engineconn plugins when inited.",
_LOCK + "-" + commonLock.getHost
)
refreshAll(false)
}
Expand All @@ -91,9 +90,9 @@ class DefaultEngineConnResourceService extends EngineConnResourceService with Lo
def destroy(): Unit = {
if (lock) {
logger.info(
"The master LinkisManager node hase released lock {}-{}.",
commonLock.getLockObject,
commonLock.getCreator
"The master LinkisManager node hase released lock {}.",
commonLock.getLockObject + "-" +
commonLock.getHost
)
commonLockService.unlock(commonLock)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ class AMHeartbeatService extends HeartbeatService with Logging {
lock = commonLockService.reentrantLock(commonLock, -1)
if (null != managerMonitor && lock) {
logger.info(
"The master am get lock by {}-{}. And start to init AMHeartbeatService monitor.",
_LOCK,
commonLock.getCreator
"The master am get lock by {}. And start to init AMHeartbeatService monitor.",
_LOCK + "-" + commonLock.getHost
)
Utils.defaultScheduler.scheduleAtFixedRate(
managerMonitor,
Expand All @@ -87,9 +86,8 @@ class AMHeartbeatService extends HeartbeatService with Logging {
if (lock) {
commonLockService.unlock(commonLock)
logger.info(
"The master am has released lock {}-{}.",
commonLock.getLockObject,
commonLock.getCreator
"The master am has released lock {}.",
commonLock.getLockObject + "-" + commonLock.getHost
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public class ContextServerConf {
public static final long CS_SCHEDULER_JOB_WAIT_MILLS =
CommonVars.apply("wds.linkis.cs.job.wait.mills", 10000).getValue();

public static final String CS_LABEL_PREFIX =
public static final String CS_LABEL_SUFFIX =
CommonVars.apply("wds.linkis.cs.label.suffix", "").getValue();
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ public void init(AvailabilityChangeEvent<AvailabilityState> availabilityChangeEv
commonLock.setHost(Utils.getLocalHostname());
commonLock.setUpdator(Utils.getJvmUser());
lock = commonLockService.reentrantLock(commonLock, -1L);
String suffix = ContextServerConf.CS_LABEL_PREFIX;
String suffix = ContextServerConf.CS_LABEL_SUFFIX;
String confLabel;

if (lock) {
// master node set cs_1_xxx label
logger.info("The master ps-cs node get lock by {}-{}.", _LOCK, commonLock.getCreator());
logger.info("The master ps-cs node get lock by {}", _LOCK + "-" + commonLock.getHost());
confLabel = "cs_1_" + suffix;
} else {
confLabel = "cs_2_" + suffix;
Expand All @@ -97,9 +97,8 @@ public void shutdown(ContextClosedEvent contextClosedEvent) {
if (lock) {
commonLockService.unlock(commonLock);
logger.info(
"The master ps-cs node has released lock {}-{}.",
commonLock.getLockObject(),
commonLock.getCreator());
"The master ps-cs node has released lock {}.",
commonLock.getLockObject() + "-" + commonLock.getHost());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void constTest() {
int csSchedulerMaxRunningJobs = ContextServerConf.CS_SCHEDULER_MAX_RUNNING_JOBS;
long csSchedulerMaxAskExecutorTimes = ContextServerConf.CS_SCHEDULER_MAX_ASK_EXECUTOR_TIMES;
long csSchedulerJobWaitMills = ContextServerConf.CS_SCHEDULER_JOB_WAIT_MILLS;
String confLabel = ContextServerConf.CS_LABEL_PREFIX;
String confLabel = ContextServerConf.CS_LABEL_SUFFIX;

Assertions.assertNotNull(keywordScanPackage);
Assertions.assertTrue(100 == csSchedulerMaxRunningJobs);
Expand Down

0 comments on commit f385cd8

Please sign in to comment.