/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (SystemProperties.getBoolean(BackFiller.class.getName())) return new BackFiller(); return null; } }
@Override public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) { TimeRange timeRange = new TimeRange(start, end - start); List<FutureLoad> loads = new ArrayList<FutureLoad>(); for (BuildableItem bi : Jenkins.getInstance().getQueue().getBuildableItems()) { TentativePlan tp = bi.getAction(TentativePlan.class); if (tp==null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp==null) continue; // no viable plan. } if (tp.isStale()) { // if the tentative plan is stale, just keep on pushing it to the current time // (if we recreate the plan, it'll be put at the end of the queue, whereas this job // should actually get priority over others) tp.range.shiftTo(System.currentTimeMillis()); } // don't let its own tentative plan count when considering a scheduling for a job if (plan.item==bi) continue; // no overlap in the time span, meaning this plan is for a distant future if (!timeRange.overlapsWith(tp.range)) continue; // if this tentative plan has no baring on this computer, that's ignorable Integer i = tp.footprint.get(computer); if (i==null) continue; return Collections.singleton(tp.range.toFutureLoad(i)); } return loads; }
/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (Boolean.getBoolean(BackFiller.class.getName())) { return new BackFiller(); } return null; } }
@Override public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) { TimeRange timeRange = new TimeRange(start, end - start); List<FutureLoad> loads = new ArrayList<FutureLoad>(); for (BuildableItem bi : Hudson.getInstance().getQueue().getBuildableItems()) { TentativePlan tp = bi.getAction(TentativePlan.class); if (tp==null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp==null) continue; // no viable plan. } if (tp.isStale()) { // if the tentative plan is stale, just keep on pushing it to the current time // (if we recreate the plan, it'll be put at the end of the queue, whereas this job // should actually get priority over others) tp.range.shiftTo(System.currentTimeMillis()); } // don't let its own tentative plan count when considering a scheduling for a job if (plan.item==bi) continue; // no overlap in the time span, meaning this plan is for a distant future if (!timeRange.overlapsWith(tp.range)) continue; // if this tentative plan has no baring on this computer, that's ignorable Integer i = tp.footprint.get(computer); if (i==null) continue; return Collections.singleton(tp.range.toFutureLoad(i)); } return loads; }
/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (Boolean.getBoolean(BackFiller.class.getName())) return new BackFiller(); return null; } }
@Override public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) { TimeRange timeRange = new TimeRange(start, end - start); List<FutureLoad> loads = new ArrayList<FutureLoad>(); for (BuildableItem bi : Hudson.getInstance().getQueue().getBuildableItems()) { TentativePlan tp = bi.getAction(TentativePlan.class); if (tp==null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp==null) continue; // no viable plan. } if (tp.isStale()) { // if the tentative plan is stale, just keep on pushing it to the current time // (if we recreate the plan, it'll be put at the end of the queue, whereas this job // should actually get priority over others) tp.range.shiftTo(System.currentTimeMillis()); } // don't let its own tentative plan count when considering a scheduling for a job if (plan.item==bi) continue; // no overlap in the time span, meaning this plan is for a distant future if (!timeRange.overlapsWith(tp.range)) continue; // if this tentative plan has no baring on this computer, that's ignorable Integer i = tp.footprint.get(computer); if (i==null) continue; return Collections.singleton(tp.range.toFutureLoad(i)); } return loads; }
/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (Boolean.getBoolean(BackFiller.class.getName())) return new BackFiller(); return null; } }
@Override public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) { TimeRange timeRange = new TimeRange(start, end - start); List<FutureLoad> loads = new ArrayList<FutureLoad>(); for (BuildableItem bi : Jenkins.getInstance().getQueue().getBuildableItems()) { TentativePlan tp = bi.getAction(TentativePlan.class); if (tp==null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp==null) continue; // no viable plan. } if (tp.isStale()) { // if the tentative plan is stale, just keep on pushing it to the current time // (if we recreate the plan, it'll be put at the end of the queue, whereas this job // should actually get priority over others) tp.range.shiftTo(System.currentTimeMillis()); } // don't let its own tentative plan count when considering a scheduling for a job if (plan.item==bi) continue; // no overlap in the time span, meaning this plan is for a distant future if (!timeRange.overlapsWith(tp.range)) continue; // if this tentative plan has no baring on this computer, that's ignorable Integer i = tp.footprint.get(computer); if (i==null) continue; return Collections.singleton(tp.range.toFutureLoad(i)); } return loads; }
/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (Boolean.getBoolean(BackFiller.class.getName())) return new BackFiller(); return null; } }
@Override public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) { TimeRange timeRange = new TimeRange(start, end - start); List<FutureLoad> loads = new ArrayList<FutureLoad>(); for (BuildableItem bi : Hudson.getInstance().getQueue().getBuildableItems()) { TentativePlan tp = bi.getAction(TentativePlan.class); if (tp==null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp==null) continue; // no viable plan. } if (tp.isStale()) { // if the tentative plan is stale, just keep on pushing it to the current time // (if we recreate the plan, it'll be put at the end of the queue, whereas this job // should actually get priority over others) tp.range.shiftTo(System.currentTimeMillis()); } // don't let its own tentative plan count when considering a scheduling for a job if (plan.item==bi) continue; // no overlap in the time span, meaning this plan is for a distant future if (!timeRange.overlapsWith(tp.range)) continue; // if this tentative plan has no baring on this computer, that's ignorable Integer i = tp.footprint.get(computer); if (i==null) continue; return Collections.singleton(tp.range.toFutureLoad(i)); } return loads; }
/** * Once this feature stabilizes, move it to the heavyjob plugin */ @Extension public static BackFiller newInstance() { if (SystemProperties.getBoolean(BackFiller.class.getName())) return new BackFiller(); return null; } }
TentativePlan tp = bi.getAction(TentativePlan.class); if (tp == null) {// do this even for bi==plan.item ensures that we have FIFO semantics in tentative plans. tp = makeTentativePlan(bi); if (tp == null) { continue; // no viable plan.