You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2019/10/23 09:59:31 UTC
[incubator-dlab] branch DLAB-1201 updated: [DLAB-1201] added
changes for other schedulers
This is an automated email from the ASF dual-hosted git repository.
ofuks pushed a commit to branch DLAB-1201
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1201 by this push:
new 366332d [DLAB-1201] added changes for other schedulers
366332d is described below
commit 366332d871c013fd4740005e125103deaec41372
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Wed Oct 23 12:58:56 2019 +0300
[DLAB-1201] added changes for other schedulers
---
.../dlab/backendapi/schedulers/CheckProjectQuoteScheduler.java | 2 +-
.../dlab/backendapi/service/impl/SchedulerJobServiceImpl.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckProjectQuoteScheduler.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckProjectQuoteScheduler.java
index f253145..030c10d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckProjectQuoteScheduler.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckProjectQuoteScheduler.java
@@ -46,7 +46,7 @@ public class CheckProjectQuoteScheduler implements Job {
.stream()
.map(ProjectDTO::getName)
.filter(billingDAO::isProjectQuoteReached)
- .peek(p -> log.warn("Stopping {} project env because of reaching user billing quote", p))
+ .peek(p -> log.debug("Stopping {} project env because of reaching user billing quote", p))
.forEach(environmentService::stopProjectEnvironment);
}
}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
index c83dbff..2f4785b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
@@ -206,14 +206,14 @@ public class SchedulerJobServiceImpl implements SchedulerJobService {
final String compName = job.getComputationalName();
final String user = job.getUser();
log.debug("Stopping exploratory {} computational {} for user {} by scheduler", expName, compName, user);
- computationalService.stopSparkCluster(securityService.getUserInfoOffline(user), expName, compName);
+ computationalService.stopSparkCluster(securityService.getServiceAccountInfo(job.getUser()), expName, compName);
}
private void terminateComputational(SchedulerJobData job) {
final String user = job.getUser();
final String expName = job.getExploratoryName();
final String compName = job.getComputationalName();
- final UserInfo userInfo = securityService.getUserInfoOffline(user);
+ final UserInfo userInfo = securityService.getServiceAccountInfo(user);
log.debug("Terminating exploratory {} computational {} for user {} by scheduler", expName, compName, user);
computationalService.terminateComputational(userInfo, expName, compName);
}
@@ -222,7 +222,7 @@ public class SchedulerJobServiceImpl implements SchedulerJobService {
final String expName = job.getExploratoryName();
final String user = job.getUser();
log.debug("Stopping exploratory {} for user {} by scheduler", expName, user);
- exploratoryService.stop(securityService.getUserInfoOffline(user), expName);
+ exploratoryService.stop(securityService.getServiceAccountInfo(user), expName);
}
private List<SchedulerJobData> getExploratorySchedulersForTerminating(OffsetDateTime now) {
@@ -243,7 +243,7 @@ public class SchedulerJobServiceImpl implements SchedulerJobService {
final String user = schedulerJobData.getUser();
final String exploratoryName = schedulerJobData.getExploratoryName();
log.debug("Starting exploratory {} for user {} by scheduler", exploratoryName, user);
- exploratoryService.start(securityService.getUserInfoOffline(user), exploratoryName, ""); //TODO chagne empty
+ exploratoryService.start(securityService.getServiceAccountInfo(user), exploratoryName, ""); //TODO chagne empty
if (schedulerJobData.getJobDTO().isSyncStartRequired()) {
log.trace("Starting computational for exploratory {} for user {} by scheduler", exploratoryName, user);
final DataEngineType sparkCluster = DataEngineType.SPARK_STANDALONE;
@@ -266,7 +266,7 @@ public class SchedulerJobServiceImpl implements SchedulerJobService {
private void startSpark(String user, String expName, String compName) {
log.debug("Starting exploratory {} computational {} for user {} by scheduler", expName, compName, user);
- computationalService.startSparkCluster(securityService.getUserInfoOffline(user), expName, compName, "");
+ computationalService.startSparkCluster(securityService.getServiceAccountInfo(user), expName, compName, "");
//TODO change empty string
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org