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

com.alibaba.schedulerx.worker.pull.TaskPullReqHandler Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
package com.alibaba.schedulerx.worker.pull;

import java.util.List;

import com.alibaba.schedulerx.protocol.Worker.MasterStartContainerRequest;
import com.alibaba.schedulerx.worker.batch.ReqQueue;
import com.alibaba.schedulerx.worker.batch.TaskDispatchReqHandler;
import com.alibaba.schedulerx.worker.master.MapTaskMaster;

/**
 *
 * @author xiaomeng.hxm
 */
public class TaskPullReqHandler extends TaskDispatchReqHandler{

    public TaskPullReqHandler(long jobInstanceId, int coreBatchThreadNum, int maxBatchThreadNum, int batchSize,
            ReqQueue queue) {
        super(jobInstanceId, coreBatchThreadNum, maxBatchThreadNum, batchSize, queue,
        "Schedulerx-Batch-Tasks-Pull-Thread-", "Schedulerx-Batch-Tasks-Retrieve-Thread-");
    }

    @Override
    public void process(long jobInstanceId, List reqs, String workerIdAddr) {
        ((MapTaskMaster)taskMasterPool.get(jobInstanceId)).batchPullTasks(
                (List)reqs, workerIdAddr);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy