Search in sources :

Example 1 with IMantisJobMetadata

use of io.mantisrx.master.jobcluster.job.IMantisJobMetadata in project mantis by Netflix.

the class SimpleCachedFileStorageProvider method loadAllArchivedJobs.

@Override
public Observable<IMantisJobMetadata> loadAllArchivedJobs() {
    List<IMantisJobMetadata> jobList = Lists.newArrayList();
    createDir(ARCHIVE_DIR);
    File archiveDirFile = new File(ARCHIVE_DIR);
    for (File jobFile : archiveDirFile.listFiles((dir, name) -> {
        return name.startsWith("Job-");
    })) {
        try {
            String jobId = jobFile.getName().substring("Job-".length());
            Optional<IMantisJobMetadata> jobMetaOp = loadJob(ARCHIVE_DIR, jobId);
            if (jobMetaOp.isPresent()) {
                jobList.add(jobMetaOp.get());
            }
        } catch (IOException e) {
            logger.error("Error reading job metadata - " + e.getMessage());
        }
    }
    return Observable.from(jobList);
}
Also used : IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) IOException(java.io.IOException) File(java.io.File)

Example 2 with IMantisJobMetadata

use of io.mantisrx.master.jobcluster.job.IMantisJobMetadata in project mantis by Netflix.

the class SimpleCachedFileStorageProvider method loadAllJobs.

// 
@Override
public List<IMantisJobMetadata> loadAllJobs() {
    List<IMantisJobMetadata> jobList = Lists.newArrayList();
    createDir(SPOOL_DIR);
    createDir(ARCHIVE_DIR);
    File spoolDirFile = new File(SPOOL_DIR);
    for (File jobFile : spoolDirFile.listFiles((dir, name) -> {
        return name.startsWith("Job-");
    })) {
        try {
            String jobId = jobFile.getName().substring("Job-".length());
            Optional<IMantisJobMetadata> jobMetaOp = loadJob(SPOOL_DIR, jobId);
            if (jobMetaOp.isPresent()) {
                jobList.add(jobMetaOp.get());
            }
        } catch (IOException e) {
            logger.error("Error reading job metadata - " + e.getMessage());
        }
    }
    return jobList;
}
Also used : IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) IOException(java.io.IOException) File(java.io.File)

Example 3 with IMantisJobMetadata

use of io.mantisrx.master.jobcluster.job.IMantisJobMetadata in project mantis by Netflix.

the class TestHelpers method createFakeScheduleRequest.

public static ScheduleRequest createFakeScheduleRequest(final WorkerId workerId, final int stageNum, final int numStages, final MachineDefinition machineDefinition) {
    try {
        JobDefinition jobDefinition = new JobDefinition.Builder().withArtifactName("jar").withSchedulingInfo(new SchedulingInfo(Collections.singletonMap(0, StageSchedulingInfo.builder().numberOfInstances(1).machineDefinition(machineDefinition).hardConstraints(Collections.emptyList()).softConstraints(Collections.emptyList()).build()))).withJobSla(new JobSla(0, 0, null, MantisJobDurationType.Perpetual, null)).build();
        IMantisJobMetadata mantisJobMetadata = new MantisJobMetadataImpl.Builder().withJobId(JobId.fromId(workerId.getJobId()).get()).withJobDefinition(jobDefinition).build();
        return new ScheduleRequest(workerId, stageNum, numStages, new JobMetadata(mantisJobMetadata.getJobId().getId(), mantisJobMetadata.getJobJarUrl(), mantisJobMetadata.getTotalStages(), mantisJobMetadata.getUser(), mantisJobMetadata.getSchedulingInfo(), mantisJobMetadata.getParameters(), mantisJobMetadata.getSubscriptionTimeoutSecs(), mantisJobMetadata.getMinRuntimeSecs()), mantisJobMetadata.getSla().get().getDurationType(), machineDefinition, Collections.emptyList(), Collections.emptyList(), 0, Optional.empty());
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
Also used : JobMetadata(io.mantisrx.server.core.domain.JobMetadata) IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) StageSchedulingInfo(io.mantisrx.runtime.descriptor.StageSchedulingInfo) SchedulingInfo(io.mantisrx.runtime.descriptor.SchedulingInfo) ScheduleRequest(io.mantisrx.server.master.scheduler.ScheduleRequest) IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) JobSla(io.mantisrx.runtime.JobSla) MantisJobMetadataImpl(io.mantisrx.master.jobcluster.job.MantisJobMetadataImpl) JobDefinition(io.mantisrx.server.master.domain.JobDefinition)

Example 4 with IMantisJobMetadata

use of io.mantisrx.master.jobcluster.job.IMantisJobMetadata in project mantis by Netflix.

the class JobClusterActor method onJobClusterInitialize.

/**
 * Initialize cluster request sent by JCM. Called in following cases.
 * 1. Master bootup : Already exists in DB
 * 2. new cluster is being created : Requires the createInStore flag to be set. If writing to DB fails a
 * failure message is sent back. The caller should then kill this
 *      * actor and inform upstream of the failure
 *
 * @param initReq
 */
@Override
public void onJobClusterInitialize(JobClusterProto.InitializeJobClusterRequest initReq) {
    ActorRef sender = getSender();
    logger.info("In onJobClusterInitialize {}", this.name);
    if (logger.isDebugEnabled()) {
        logger.debug("Init Request {}", initReq);
    }
    jobClusterMetadata = new JobClusterMetadataImpl.Builder().withLastJobCount(initReq.lastJobNumber).withIsDisabled(initReq.isDisabled).withJobClusterDefinition(initReq.jobClusterDefinition).build();
    // create sla enforcer
    slaEnforcer = new SLAEnforcer(jobClusterMetadata.getJobClusterDefinition().getSLA());
    long expireFrequency = ConfigurationProvider.getConfig().getCompletedJobPurgeFrequencySeqs();
    // If cluster is disabled
    if (jobClusterMetadata.isDisabled()) {
        logger.info("Cluster {} initialized but is Disabled", jobClusterMetadata.getJobClusterDefinition().getName());
        // add completed jobs to cache to use when / if cluster is reenabled
        jobManager.addCompletedJobsToCache(initReq.completedJobsList);
        int count = 50;
        if (!initReq.jobList.isEmpty()) {
            logger.info("Cluster {} is disabled however it has {} active/accepted jobs", jobClusterMetadata.getJobClusterDefinition().getName(), initReq.jobList.size());
            for (IMantisJobMetadata jobMeta : initReq.jobList) {
                try {
                    if (count == 0) {
                        logger.info("Max cleanup limit of 50 reached abort");
                        break;
                    }
                    if (!JobState.isTerminalState(jobMeta.getState())) {
                        logger.info("Job {} is in non terminal state {} for disabled cluster {}." + "Marking it complete", jobMeta.getJobId(), jobMeta.getState(), jobClusterMetadata.getJobClusterDefinition().getName());
                        count--;
                        jobManager.markCompletedDuringStartup(jobMeta.getJobId(), System.currentTimeMillis(), jobMeta, JobState.Completed);
                        jobStore.archiveJob(jobMeta);
                    }
                } catch (Exception e) {
                    logger.error("Exception {} archiving job {} during init ", e.getMessage(), jobMeta.getJobId());
                }
            }
        }
        sender.tell(new JobClusterProto.InitializeJobClusterResponse(initReq.requestId, SUCCESS, String.format("JobCluster %s initialized successfully. But is currently disabled", initReq.jobClusterDefinition.getName()), initReq.jobClusterDefinition.getName(), initReq.requestor), getSelf());
        logger.info("Job expiry check frquency set to {}", expireFrequency);
        setExpiredJobsTimer(expireFrequency);
        getContext().become(disabledBehavior);
        return;
    } else {
        // new cluster initialization
        if (initReq.createInStore) {
            try {
                jobStore.createJobCluster(jobClusterMetadata);
                eventPublisher.publishAuditEvent(new LifecycleEventsProto.AuditEvent(LifecycleEventsProto.AuditEvent.AuditEventType.JOB_CLUSTER_CREATE, jobClusterMetadata.getJobClusterDefinition().getName(), "saved job cluster " + name));
                logger.info("successfully saved job cluster {}", name);
                numJobClustersInitialized.increment();
            } catch (final JobClusterAlreadyExistsException exists) {
                numJobClusterInitializeFailures.increment();
                logger.error("job cluster not created");
                sender.tell(new JobClusterProto.InitializeJobClusterResponse(initReq.requestId, CLIENT_ERROR, String.format("JobCluster %s already exists", initReq.jobClusterDefinition.getName()), initReq.jobClusterDefinition.getName(), initReq.requestor), getSelf());
                // TODO: handle case when job cluster exists in store but Job cluster actor is not running
                return;
            } catch (final Exception e) {
                numJobClusterInitializeFailures.increment();
                logger.error("job cluster not created due to {}", e.getMessage(), e);
                sender.tell(new JobClusterProto.InitializeJobClusterResponse(initReq.requestId, SERVER_ERROR, String.format("JobCluster %s not created due to %s", initReq.jobClusterDefinition.getName(), e.getMessage()), initReq.jobClusterDefinition.getName(), initReq.requestor), getSelf());
                // so we don't send back 2 InitJobClusterResponses
                return;
            }
        }
        try {
            cronManager = new CronManager(name, getSelf(), jobClusterMetadata.getJobClusterDefinition().getSLA());
        } catch (Exception e) {
            logger.warn("Exception initializing cron {}", e);
        }
        initRunningJobs(initReq, sender);
        setExpiredJobsTimer(expireFrequency);
        logger.info("Job expiry check frquency set to {}", expireFrequency);
        try {
            jobManager.addCompletedJobsToCache(initReq.completedJobsList);
        } catch (Exception e) {
            logger.warn("Exception initializing completed jobs " + e.getMessage());
        }
    }
}
Also used : JobClusterProto(io.mantisrx.master.jobcluster.proto.JobClusterProto) ActorRef(akka.actor.ActorRef) IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) JobClusterAlreadyExistsException(io.mantisrx.server.master.persistence.exceptions.JobClusterAlreadyExistsException) TriggerNotFoundException(com.netflix.fenzo.triggers.exceptions.TriggerNotFoundException) SchedulerException(com.netflix.fenzo.triggers.exceptions.SchedulerException) JobClusterAlreadyExistsException(io.mantisrx.server.master.persistence.exceptions.JobClusterAlreadyExistsException) LifecycleEventsProto(io.mantisrx.master.events.LifecycleEventsProto)

Example 5 with IMantisJobMetadata

use of io.mantisrx.master.jobcluster.job.IMantisJobMetadata in project mantis by Netflix.

the class JobClusterActor method getFilteredTerminalJobList.

/**
 * JobState ActiveOnly Execute?
 *   None    None        Y
 *   None    TRUE        N
 *   None    FALSE       Y
 *   Active  None        N
 *   Active  TRUE        N
 *   Active  FALSE       N
 *   Terminal None       Y
 *   Terminal TRUE       Y
 *   Terminal FALSE      Y
 * @param request
 * @return
 */
private Observable<MantisJobMetadataView> getFilteredTerminalJobList(ListJobCriteria request, Set<JobId> jobIdSet) {
    if (logger.isTraceEnabled()) {
        logger.trace("JobClusterActor:getFilteredTerminalJobList");
    }
    if ((request.getJobState().isPresent() && !request.getJobState().get().equals(JobState.MetaState.Terminal))) {
        if (logger.isTraceEnabled()) {
            logger.trace("Exit JobClusterActor:getFilteredTerminalJobList with empty");
        }
        return Observable.empty();
    } else if (!request.getJobState().isPresent() && (request.getActiveOnly().isPresent() && request.getActiveOnly().get())) {
        if (logger.isTraceEnabled()) {
            logger.trace("Exit JobClusterActor:getFilteredTerminalJobList with empty");
        }
        return Observable.empty();
    }
    List<CompletedJob> jobInfoList;
    if (!jobIdSet.isEmpty()) {
        jobInfoList = jobIdSet.stream().map((jId) -> jobManager.getCompletedJob(jId)).filter((compJobOp) -> compJobOp.isPresent()).map((compJobOp) -> compJobOp.get()).collect(Collectors.toList());
    } else {
        jobInfoList = jobManager.getCompletedJobsList();
    }
    List<CompletedJob> shortenedList = jobInfoList.subList(0, Math.min(jobInfoList.size(), request.getLimit().orElse(DEFAULT_LIMIT)));
    return Observable.from(shortenedList).flatMap((cJob) -> {
        try {
            if (logger.isDebugEnabled()) {
                logger.debug("Fetching details for completed job {}", cJob);
            }
            Optional<IMantisJobMetadata> metaOp = jobManager.getJobDataForCompletedJob(cJob.getJobId());
            if (metaOp.isPresent()) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Fetched details for completed job {} -> {}", cJob, metaOp.get());
                }
                return Observable.just(new MantisJobMetadataView(metaOp.get(), cJob.getTerminatedAt(), request.getStageNumberList(), request.getWorkerIndexList(), request.getWorkerNumberList(), request.getWorkerStateList(), false));
            }
        } catch (Exception e) {
            logger.error("caught exception", e);
            return Observable.empty();
        }
        return Observable.empty();
    });
}
Also used : JobId(io.mantisrx.server.master.domain.JobId) Terminated(akka.actor.Terminated) Optional.of(java.util.Optional.of) MantisJobStore(io.mantisrx.server.master.persistence.MantisJobStore) Action1(rx.functions.Action1) TriggerOperator(com.netflix.fenzo.triggers.TriggerOperator) GetLastSubmittedJobIdStreamResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetLastSubmittedJobIdStreamResponse) JobActor(io.mantisrx.master.jobcluster.job.JobActor) ListArchivedWorkersRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListArchivedWorkersRequest) ActorRef(akka.actor.ActorRef) UpdateJobClusterLabelsResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterLabelsResponse) UpdateJobClusterArtifactResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterArtifactResponse) Duration(java.time.Duration) Map(java.util.Map) CronPolicy(io.mantisrx.server.master.domain.IJobClusterDefinition.CronPolicy) Schedulers(rx.schedulers.Schedulers) Metrics(io.mantisrx.common.metrics.Metrics) Preconditions(com.netflix.spectator.impl.Preconditions) DisableJobClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.DisableJobClusterResponse) ListCompletedJobsInClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListCompletedJobsInClusterResponse) JobDefinition(io.mantisrx.server.master.domain.JobDefinition) Set(java.util.Set) ListCompletedJobsInClusterRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListCompletedJobsInClusterRequest) ScaleStageRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ScaleStageRequest) JobStartedEvent(io.mantisrx.master.jobcluster.proto.JobClusterProto.JobStartedEvent) SubmitJobRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.SubmitJobRequest) CompletionStage(java.util.concurrent.CompletionStage) UpdateJobClusterWorkerMigrationStrategyRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterWorkerMigrationStrategyRequest) TriggerNotFoundException(com.netflix.fenzo.triggers.exceptions.TriggerNotFoundException) JobHelper(io.mantisrx.master.jobcluster.job.JobHelper) ListJobIdsRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobIdsRequest) BehaviorSubject(rx.subjects.BehaviorSubject) ListWorkersRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListWorkersRequest) GetJobDefinitionUpdatedFromJobActorRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDefinitionUpdatedFromJobActorRequest) Optional.empty(java.util.Optional.empty) SERVER_ERROR(io.mantisrx.master.jobcluster.proto.BaseResponse.ResponseCode.SERVER_ERROR) CronTrigger(com.netflix.fenzo.triggers.CronTrigger) MetricsRegistry(io.mantisrx.common.metrics.MetricsRegistry) JobConstraints(io.mantisrx.runtime.JobConstraints) LabelUtils(com.mantisrx.common.utils.LabelUtils) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ListJobIdsResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobIdsResponse) SupervisorStrategy(akka.actor.SupervisorStrategy) JobClusterDefinitionImpl(io.mantisrx.server.master.domain.JobClusterDefinitionImpl) WorkerEvent(io.mantisrx.server.master.scheduler.WorkerEvent) GetLastSubmittedJobIdStreamRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetLastSubmittedJobIdStreamRequest) Label(io.mantisrx.common.Label) EnableJobClusterRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.EnableJobClusterRequest) GetJobClusterRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobClusterRequest) UpdateJobClusterRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterRequest) MANTIS_MASTER_USER(io.mantisrx.master.StringConstants.MANTIS_MASTER_USER) CLIENT_ERROR_NOT_FOUND(io.mantisrx.master.jobcluster.proto.BaseResponse.ResponseCode.CLIENT_ERROR_NOT_FOUND) UpdateJobClusterWorkerMigrationStrategyResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterWorkerMigrationStrategyResponse) CompletedJob(io.mantisrx.server.master.domain.JobClusterDefinitionImpl.CompletedJob) IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) KillJobResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.KillJobResponse) SchedulerException(com.netflix.fenzo.triggers.exceptions.SchedulerException) IMantisWorkerMetadata(io.mantisrx.master.jobcluster.job.worker.IMantisWorkerMetadata) ListJobsResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobsResponse) EnableJobClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.EnableJobClusterResponse) IJobClusterDefinition(io.mantisrx.server.master.domain.IJobClusterDefinition) JobState(io.mantisrx.master.jobcluster.job.JobState) GetJobSchedInfoRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobSchedInfoRequest) LoggerFactory(org.slf4j.LoggerFactory) GaugeCallback(io.mantisrx.common.metrics.spectator.GaugeCallback) StageSchedulingInfo(io.mantisrx.runtime.descriptor.StageSchedulingInfo) JobCompletedReason(io.mantisrx.server.core.JobCompletedReason) InvalidJobRequest(io.mantisrx.server.master.InvalidJobRequest) MantisScheduler(io.mantisrx.server.master.scheduler.MantisScheduler) ListJobsRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobsRequest) CLIENT_ERROR(io.mantisrx.master.jobcluster.proto.BaseResponse.ResponseCode.CLIENT_ERROR) GetJobClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobClusterResponse) JobClusterProto(io.mantisrx.master.jobcluster.proto.JobClusterProto) GetLatestJobDiscoveryInfoResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetLatestJobDiscoveryInfoResponse) GetJobDetailsResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDetailsResponse) BasicTag(com.netflix.spectator.api.BasicTag) JobProto(io.mantisrx.master.jobcluster.proto.JobProto) ResubmitWorkerResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ResubmitWorkerResponse) ConstraintsEvaluators(io.mantisrx.server.master.ConstraintsEvaluators) DisableJobClusterRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.DisableJobClusterRequest) ResubmitWorkerRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ResubmitWorkerRequest) GetJobDefinitionUpdatedFromJobActorResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDefinitionUpdatedFromJobActorResponse) UpdateJobClusterLabelsRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterLabelsRequest) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) SLA(io.mantisrx.server.master.domain.SLA) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) GetJobSchedInfoResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobSchedInfoResponse) Objects(java.util.Objects) List(java.util.List) PatternsCS.ask(akka.pattern.PatternsCS.ask) GetJobDetailsRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDetailsRequest) SubmitJobResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.SubmitJobResponse) ConfigurationProvider(io.mantisrx.server.master.config.ConfigurationProvider) Optional(java.util.Optional) Props(akka.actor.Props) UpdateJobClusterSLARequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterSLARequest) MantisJobMetadataView(io.mantisrx.master.jobcluster.job.MantisJobMetadataView) ScaleStageResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ScaleStageResponse) UpdateJobClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterResponse) JobIdInfo(io.mantisrx.master.api.akka.route.proto.JobClusterProtoAdapter.JobIdInfo) KillJobRequest(io.mantisrx.master.jobcluster.proto.JobClusterProto.KillJobRequest) ListArchivedWorkersResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListArchivedWorkersResponse) MantisJobMetadataImpl(io.mantisrx.master.jobcluster.job.MantisJobMetadataImpl) JobSla(io.mantisrx.runtime.JobSla) HashMap(java.util.HashMap) UpdateJobClusterSLAResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterSLAResponse) MantisActorSupervisorStrategy(io.mantisrx.master.akka.MantisActorSupervisorStrategy) ConcurrentMap(java.util.concurrent.ConcurrentMap) Observable(rx.Observable) HashSet(java.util.HashSet) LifecycleEventsProto(io.mantisrx.master.events.LifecycleEventsProto) DeleteJobClusterResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.DeleteJobClusterResponse) ListWorkersResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListWorkersResponse) AbstractActorWithTimers(akka.actor.AbstractActorWithTimers) JobClusterAlreadyExistsException(io.mantisrx.server.master.persistence.exceptions.JobClusterAlreadyExistsException) Counter(io.mantisrx.common.metrics.Counter) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Optional.ofNullable(java.util.Optional.ofNullable) ListJobCriteria(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobCriteria) GetLatestJobDiscoveryInfoRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetLatestJobDiscoveryInfoRequest) JobClusterConfig(io.mantisrx.server.master.domain.JobClusterConfig) SUCCESS(io.mantisrx.master.jobcluster.proto.BaseResponse.ResponseCode.SUCCESS) JobClusterManagerProto(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto) Lists(io.mantisrx.shaded.com.google.common.collect.Lists) UpdateJobClusterArtifactRequest(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.UpdateJobClusterArtifactRequest) Collections(java.util.Collections) LifecycleEventPublisher(io.mantisrx.master.events.LifecycleEventPublisher) JobClustersManagerInitializeResponse(io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.JobClustersManagerInitializeResponse) MetricGroupId(io.mantisrx.common.metrics.spectator.MetricGroupId) CompletedJob(io.mantisrx.server.master.domain.JobClusterDefinitionImpl.CompletedJob) MantisJobMetadataView(io.mantisrx.master.jobcluster.job.MantisJobMetadataView) IMantisJobMetadata(io.mantisrx.master.jobcluster.job.IMantisJobMetadata) TriggerNotFoundException(com.netflix.fenzo.triggers.exceptions.TriggerNotFoundException) SchedulerException(com.netflix.fenzo.triggers.exceptions.SchedulerException) JobClusterAlreadyExistsException(io.mantisrx.server.master.persistence.exceptions.JobClusterAlreadyExistsException)

Aggregations

IMantisJobMetadata (io.mantisrx.master.jobcluster.job.IMantisJobMetadata)16 JobClusterProto (io.mantisrx.master.jobcluster.proto.JobClusterProto)8 ActorRef (akka.actor.ActorRef)7 MantisJobMetadataImpl (io.mantisrx.master.jobcluster.job.MantisJobMetadataImpl)7 GetJobDetailsResponse (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDetailsResponse)7 GetJobDetailsRequest (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.GetJobDetailsRequest)6 MantisJobStore (io.mantisrx.server.master.persistence.MantisJobStore)6 JobClusterAlreadyExistsException (io.mantisrx.server.master.persistence.exceptions.JobClusterAlreadyExistsException)6 MantisScheduler (io.mantisrx.server.master.scheduler.MantisScheduler)6 SchedulerException (com.netflix.fenzo.triggers.exceptions.SchedulerException)5 TriggerNotFoundException (com.netflix.fenzo.triggers.exceptions.TriggerNotFoundException)5 IMantisWorkerMetadata (io.mantisrx.master.jobcluster.job.worker.IMantisWorkerMetadata)5 JobWorker (io.mantisrx.master.jobcluster.job.worker.JobWorker)5 DisableJobClusterRequest (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.DisableJobClusterRequest)5 DisableJobClusterResponse (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.DisableJobClusterResponse)5 EnableJobClusterRequest (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.EnableJobClusterRequest)5 EnableJobClusterResponse (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.EnableJobClusterResponse)5 ListJobsRequest (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobsRequest)5 ListJobsResponse (io.mantisrx.master.jobcluster.proto.JobClusterManagerProto.ListJobsResponse)5 JobSla (io.mantisrx.runtime.JobSla)5