use of com.netflix.titus.master.service.management.ManagementSubsystemInitializer in project titus-control-plane by Netflix.
the class JobsScenarioBuilder method createAndActivateV3JobOperations.
private DefaultV3JobOperations createAndActivateV3JobOperations() {
TokenBucket stuckInStateRateLimiter = Limiters.unlimited("stuckInState");
BatchDifferenceResolver batchDifferenceResolver = new BatchDifferenceResolver(configuration, runtime, featureActivationConfiguration, capacityGroupService, jobStore, versionSupplier, stuckInStateRateLimiter, titusRuntime, testScheduler);
ServiceDifferenceResolver serviceDifferenceResolver = new ServiceDifferenceResolver(configuration, runtime, featureActivationConfiguration, capacityGroupService, jobStore, versionSupplier, stuckInStateRateLimiter, titusRuntime, testScheduler);
JobSubmitLimiter jobSubmitLimiter = new JobSubmitLimiter() {
@Override
public <JOB_DESCR> Optional<String> checkIfAllowed(JOB_DESCR jobDescriptor) {
return Optional.empty();
}
@Override
public <JOB_DESCR> Optional<String> reserveId(JOB_DESCR jobDescriptor) {
return Optional.empty();
}
@Override
public <JOB_DESCR> void releaseId(JOB_DESCR jobDescriptor) {
}
};
DefaultV3JobOperations v3JobOperations = new DefaultV3JobOperations(configuration, featureActivationConfiguration, jobStore, runtime, new JobReconciliationFrameworkFactory(configuration, featureActivationConfiguration, batchDifferenceResolver, serviceDifferenceResolver, jobStore, capacityGroupService, newJobSanitizer(VerifierMode.Permissive), newJobSanitizer(VerifierMode.Strict), versionSupplier, titusRuntime, Optional.of(testScheduler)), jobSubmitLimiter, new ManagementSubsystemInitializer(null, null), titusRuntime, EntitySanitizerBuilder.stdBuilder().build(), versionSupplier);
v3JobOperations.enterActiveMode();
return v3JobOperations;
}
Aggregations