Search in sources :

Example 1 with DefaultV3JobOperations

use of com.netflix.titus.master.jobmanager.service.DefaultV3JobOperations 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;
}
Also used : JobSubmitLimiter(com.netflix.titus.master.jobmanager.service.limiter.JobSubmitLimiter) JobReconciliationFrameworkFactory(com.netflix.titus.master.jobmanager.service.JobReconciliationFrameworkFactory) TokenBucket(com.netflix.titus.common.util.limiter.tokenbucket.TokenBucket) ServiceDifferenceResolver(com.netflix.titus.master.jobmanager.service.service.ServiceDifferenceResolver) BatchDifferenceResolver(com.netflix.titus.master.jobmanager.service.batch.BatchDifferenceResolver) DefaultV3JobOperations(com.netflix.titus.master.jobmanager.service.DefaultV3JobOperations) ManagementSubsystemInitializer(com.netflix.titus.master.service.management.ManagementSubsystemInitializer)

Aggregations

TokenBucket (com.netflix.titus.common.util.limiter.tokenbucket.TokenBucket)1 DefaultV3JobOperations (com.netflix.titus.master.jobmanager.service.DefaultV3JobOperations)1 JobReconciliationFrameworkFactory (com.netflix.titus.master.jobmanager.service.JobReconciliationFrameworkFactory)1 BatchDifferenceResolver (com.netflix.titus.master.jobmanager.service.batch.BatchDifferenceResolver)1 JobSubmitLimiter (com.netflix.titus.master.jobmanager.service.limiter.JobSubmitLimiter)1 ServiceDifferenceResolver (com.netflix.titus.master.jobmanager.service.service.ServiceDifferenceResolver)1 ManagementSubsystemInitializer (com.netflix.titus.master.service.management.ManagementSubsystemInitializer)1