Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cuebot] Fix FrameCompleteHandler #1053

Merged
merged 2 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cuebot/src/main/java/com/imageworks/spcue/dao/GroupDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,6 @@ public interface GroupDao {
*/
boolean isOverMinCores(JobInterface job);

/**
* Returns true if the group of the specified job is at or over its min gpus
*
* @param job
* @return
*/
boolean isOverMinGpus(JobInterface job);

/**
* Returns true if the group is managed.
*
Expand Down
8 changes: 0 additions & 8 deletions cuebot/src/main/java/com/imageworks/spcue/dao/JobDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,6 @@ public interface JobDao {
*/
boolean isOverMaxCores(JobInterface job, int coreUnits);

/**
* reteurns true if job is over its minimum gpus
*
* @param job
* @return boolean
*/
boolean isOverMinGpus(JobInterface job);

/**
* returns true if job is over max gpus
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,25 +280,6 @@ public void updateMinGpus(GroupInterface group, int value) {
value, group.getId());
}

private static final String IS_OVER_MIN_GPUS =
"SELECT " +
"COUNT(1) " +
"FROM " +
"job,"+
"folder_resource fr "+
"WHERE " +
"job.pk_folder = fr.pk_folder " +
"AND " +
"fr.int_gpus > fr.int_min_gpus " +
"AND "+
"job.pk_job = ?";

@Override
public boolean isOverMinGpus(JobInterface job) {
return getJdbcTemplate().queryForObject(IS_OVER_MIN_GPUS,
Integer.class, job.getJobId()) > 0;
}

@Override
public void updateDefaultJobPriority(GroupInterface group, int value) {
if (value < 0) { value = CueUtil.FEATURE_DISABLED; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,22 +662,6 @@ public boolean isAtMaxCores(JobInterface job) {
Integer.class, job.getJobId()) > 0;
}

private static final String IS_JOB_OVER_MIN_GPUS =
"SELECT " +
"COUNT(1) " +
"FROM " +
"job_resource " +
"WHERE " +
"job_resource.pk_job = ? " +
"AND " +
"job_resource.int_gpus > job_resource.int_min_gpus";

@Override
public boolean isOverMinGpus(JobInterface job) {
return getJdbcTemplate().queryForObject(IS_JOB_OVER_MIN_GPUS,
Integer.class, job.getJobId()) > 0;
}

private static final String IS_JOB_OVER_MAX_GPUS =
"SELECT " +
"COUNT(1) " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ else if (report.getHost().getNimbyLocked()) {
// Then check for higher priority jobs
// If not, rebook this job
if (job.autoUnbook && proc.coresReserved >= 100) {
if (jobManager.isOverMinCores(job) && jobManager.isOverMinGpus(job)) {
if (jobManager.isOverMinCores(job)) {
try {

boolean unbook =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,6 @@ public interface JobManager {
*/
boolean isOverMinCores(JobInterface job);

/**
* Return true if the given job is booked greater than min gpus.
*
* @param job
* @return
*/
boolean isOverMinGpus(JobInterface job);

/**
* Increase the layer memory requirement to given KB value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ public boolean isOverMinCores(JobInterface job) {
return jobDao.isOverMinCores(job);
}

@Override
@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
public boolean isOverMinGpus(JobInterface job) {
return jobDao.isOverMinGpus(job);
}

@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
public DispatchJob getDispatchJob(String id) {
return jobDao.getDispatchJob(id);
Expand Down