@Test public void testPercentageBasedQuota() { Job<BatchJobExt> job = newBatchJobWithPercentageLimit(10, 80); UnhealthyTasksLimitTracker tracker = UnhealthyTasksLimitTracker.percentageLimit( job, (AvailabilityPercentageLimitDisruptionBudgetPolicy) job.getJobDescriptor().getDisruptionBudget().getDisruptionBudgetPolicy(), jobOperations, jobComponentStub.getContainerHealthService() ); testQuota(tracker, Reference.job(job.getId())); }
public static UnhealthyTasksLimitTracker percentageLimit(Job<?> job, AvailabilityPercentageLimitDisruptionBudgetPolicy policy, V3JobOperations jobOperations, ContainerHealthService containerHealthService) { return new UnhealthyTasksLimitTracker(job, computeHealthyPoolSizeFromPercentage(job, policy), jobOperations, containerHealthService); }
UnhealthyTasksLimitTracker implements QuotaTracker { public static UnhealthyTasksLimitTracker percentageLimit(Job<?> job, AvailabilityPercentageLimitDisruptionBudgetPolicy policy, V3JobOperations jobOperations, ContainerHealthService containerHealthService) { return new UnhealthyTasksLimitTracker(job, computeHealthyPoolSizeFromPercentage(job, policy), jobOperations, containerHealthService); } }
UnhealthyTasksLimitTracker implements QuotaTracker { public static UnhealthyTasksLimitTracker percentageLimit(Job<?> job, AvailabilityPercentageLimitDisruptionBudgetPolicy policy, V3JobOperations jobOperations, ContainerHealthService containerHealthService) { return new UnhealthyTasksLimitTracker(job, computeHealthyPoolSizeFromPercentage(job, policy), jobOperations, containerHealthService); } private  UnhealthyTasksLimitTracker(Job<?> job,
                                       int minimumHealthyCount,
                                       V3JobOperations jobOperations,
                                       ContainerHealthService containerHealthService); }
UnhealthyTasksLimitTracker implements QuotaTracker { public static UnhealthyTasksLimitTracker percentageLimit(Job<?> job, AvailabilityPercentageLimitDisruptionBudgetPolicy policy, V3JobOperations jobOperations, ContainerHealthService containerHealthService) { return new UnhealthyTasksLimitTracker(job, computeHealthyPoolSizeFromPercentage(job, policy), jobOperations, containerHealthService); } private  UnhealthyTasksLimitTracker(Job<?> job,
                                       int minimumHealthyCount,
                                       V3JobOperations jobOperations,
                                       ContainerHealthService containerHealthService); @Override EvictionQuota getQuota(Reference reference); static UnhealthyTasksLimitTracker percentageLimit(Job<?> job,
                                                             AvailabilityPercentageLimitDisruptionBudgetPolicy policy,
                                                             V3JobOperations jobOperations,
                                                             ContainerHealthService containerHealthService); static UnhealthyTasksLimitTracker absoluteLimit(Job<?> job,
                                                           UnhealthyTasksLimitDisruptionBudgetPolicy policy,
                                                           V3JobOperations jobOperations,
                                                           ContainerHealthService containerHealthService); }
UnhealthyTasksLimitTracker implements QuotaTracker { public static UnhealthyTasksLimitTracker percentageLimit(Job<?> job, AvailabilityPercentageLimitDisruptionBudgetPolicy policy, V3JobOperations jobOperations, ContainerHealthService containerHealthService) { return new UnhealthyTasksLimitTracker(job, computeHealthyPoolSizeFromPercentage(job, policy), jobOperations, containerHealthService); } private  UnhealthyTasksLimitTracker(Job<?> job,
                                       int minimumHealthyCount,
                                       V3JobOperations jobOperations,
                                       ContainerHealthService containerHealthService); @Override EvictionQuota getQuota(Reference reference); static UnhealthyTasksLimitTracker percentageLimit(Job<?> job,
                                                             AvailabilityPercentageLimitDisruptionBudgetPolicy policy,
                                                             V3JobOperations jobOperations,
                                                             ContainerHealthService containerHealthService); static UnhealthyTasksLimitTracker absoluteLimit(Job<?> job,
                                                           UnhealthyTasksLimitDisruptionBudgetPolicy policy,
                                                           V3JobOperations jobOperations,
                                                           ContainerHealthService containerHealthService);  }