All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.schedulerx.worker.batch.TaskCreateReqHandler Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
//package com.alibaba.schedulerx.worker.batch;
//
//import java.util.List;
//
//import com.alibaba.schedulerx.worker.domain.MapTaskListInfo;
//import com.alibaba.schedulerx.worker.log.LogFactory;
//import com.alibaba.schedulerx.worker.log.Logger;
//import com.alibaba.schedulerx.worker.master.MapTaskMaster;
//
///**
// * @author yanxun on 2019/1/10.
// */
//@Deprecated
//public class TaskCreateReqHandler extends BaseReqHandler{
//    private static final Logger LOGGER = LogFactory.getLogger(TMStatusReqHandler.class);
//
//    public TaskCreateReqHandler(long jobInstanceId, int coreBatchThreadNum, int maxBatchThreadNum, int batchSize,
//                                ReqQueue queue) {
//        super(jobInstanceId, coreBatchThreadNum, maxBatchThreadNum, batchSize, queue,
//            "Task-Create-Thread-", "Task-Create-Thread-");
//        defaultSleepMs = 100;
//    }
//
//
//    @Override
//    void process(long jobInstanceId, List reqs) {
//        batchProcessSvc.submit(new BatchTasksCreateRunnable(jobInstanceId, (List) reqs));
//    }
//
//    private class BatchTasksCreateRunnable implements Runnable {
//        private long jobInstanceId;
//        private List taskCreateInfos;
//        BatchTasksCreateRunnable(long jobInstanceId, List taskCreateInfos) {
//            this.jobInstanceId = jobInstanceId;
//            this.taskCreateInfos = taskCreateInfos;
//        }
//
//        @Override
//        public void run() {
//            try {
//                ((MapTaskMaster)taskMasterPool.get(jobInstanceId)).createTasks(taskCreateInfos);
//            } catch (Throwable e) {
//                LOGGER.error(e);
//            } finally {
//                activeRunnableNum.decrementAndGet();
//            }
//        }
//    }
//}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy