Search in sources :

Example 6 with SumbitTaskInterface

use of com.bonree.brfs.schedulers.task.meta.SumbitTaskInterface in project BRFS by zhangnianli.

the class MetaTaskLeaderManager method createCheckCyclePool.

public void createCheckCyclePool() throws ParamsErrorException {
    Properties prop = DefaultBaseSchedulers.createSimplePrope(1, 1000L);
    boolean createFlag = this.manager.createTaskPool(COPY_CYCLE_POOL, prop);
    if (!createFlag) {
        LOG.warn("create check pool fail !!!!");
        return;
    }
    boolean cFlag = this.manager.startTaskPool(COPY_CYCLE_POOL);
    if (!cFlag) {
        LOG.info("Follower will quiting  !!!");
        return;
    }
    Map content = JobDataMapConstract.createCylcCheckDataMap(this.config.getCheckTimeRange());
    SumbitTaskInterface sumbit = QuartzCronInfo.getInstance("CYCLE_CHECK_JOB", "CYCLE_CHECK_JOB", this.config.getCheckCronStr(), content, CheckCycleJob.class);
    cFlag = this.manager.addTask("COPY_CYCLE_POOL", sumbit);
    LOG.info("sumbit Cycle task :{}", Boolean.valueOf(cFlag));
}
Also used : SumbitTaskInterface(com.bonree.brfs.schedulers.task.meta.SumbitTaskInterface) Properties(java.util.Properties) Map(java.util.Map)

Aggregations

SumbitTaskInterface (com.bonree.brfs.schedulers.task.meta.SumbitTaskInterface)6 MetaTaskManagerInterface (com.bonree.brfs.schedulers.task.manager.MetaTaskManagerInterface)3 SchedulerManagerInterface (com.bonree.brfs.schedulers.task.manager.SchedulerManagerInterface)3 Properties (java.util.Properties)3 TaskType (com.bonree.brfs.common.task.TaskType)2 RunnableTaskInterface (com.bonree.brfs.schedulers.task.manager.RunnableTaskInterface)2 JsonException (com.bonree.brfs.common.utils.JsonUtils.JsonException)1 EmailPool (com.bonree.brfs.email.EmailPool)1 LimitServerResource (com.bonree.brfs.resourceschedule.model.LimitServerResource)1 ManagerContralFactory (com.bonree.brfs.schedulers.ManagerContralFactory)1 CopyRecoveryJob (com.bonree.brfs.schedulers.jobs.biz.CopyRecoveryJob)1 GatherResourceJob (com.bonree.brfs.schedulers.jobs.resource.GatherResourceJob)1 TaskExecutablePattern (com.bonree.brfs.schedulers.task.model.TaskExecutablePattern)1 TaskModel (com.bonree.brfs.schedulers.task.model.TaskModel)1 TaskRunPattern (com.bonree.brfs.schedulers.task.model.TaskRunPattern)1 Map (java.util.Map)1 JobDataMap (org.quartz.JobDataMap)1