Package com.alibaba.otter.shared.common.model.config.channel

Examples of com.alibaba.otter.shared.common.model.config.channel.ChannelStatus


        TransformStageListener transformStageListener = ArbitrateFactory.getInstance(pipelineId,
                                                                                     TransformStageListener.class);
        Long processId = transformStageListener.waitForProcess(); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            // 根据pipelineId+processId构造对应的path
            String path = StagePathUtils.getExtractStage(pipelineId, processId);

            try {
                byte[] data = zookeeper.readData(path);
View Full Code Here


        permitMonitor.waitForPermit();// 阻塞等待授权

        SelectStageListener selectStageListener = ArbitrateFactory.getInstance(pipelineId, SelectStageListener.class);
        Long processId = selectStageListener.waitForProcess(); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变

            try {
                EtlEventData eventData = new EtlEventData();
                eventData.setPipelineId(pipelineId);
                eventData.setProcessId(processId);
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        RpcStageController stageController = ArbitrateFactory.getInstance(pipelineId, RpcStageController.class);
        Long processId = stageController.waitForProcess(StageType.LOAD); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            return stageController.getLastData(processId);
        } else {
            // 需要进一步check,避免丢失load信号
            status = permitMonitor.getChannelPermit(true);
            if (status.isStart()) {
                return stageController.getLastData(processId);
            } else if (status.isPause()) {
                String path = StagePathUtils.getProcess(pipelineId, processId);
                if (zookeeper.exists(path)) { // 如果存在process,那说明没有被rollback掉(可能刚好在做rollback),这种运行进行load处理
                    return stageController.getLastData(processId);
                }
            }
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        RpcStageController stageController = ArbitrateFactory.getInstance(pipelineId, RpcStageController.class);
        Long processId = stageController.waitForProcess(StageType.TRANSFORM); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart() || status.isPause()) {// pause状态也让其处理,避免误删除pause状态的processId,导致通道挂起
            EtlEventData eventData = stageController.getLastData(processId);
            eventData.setNextNid(ArbitrateConfigUtils.getCurrentNid());// 下一个节点信息即为自己
            return eventData;
        } else {
            logger.warn("pipelineId[{}] transform ignore processId[{}] by status[{}]", new Object[] { pipelineId,
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        RpcStageController stageController = ArbitrateFactory.getInstance(pipelineId, RpcStageController.class);
        Long processId = stageController.waitForProcess(StageType.EXTRACT); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart() || status.isPause()) {// pause状态也让其处理,避免误删除pause状态的processId,导致通道挂起
            EtlEventData eventData = stageController.getLastData(processId);
            Node node = LoadBalanceFactory.getNextTransformNode(pipelineId);// 获取下一个处理节点信息
            if (node == null) {// 没有后端节点
                throw new ArbitrateException("Extract_single", "no next node");
            } else {
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        MemoryStageController stageController = ArbitrateFactory.getInstance(pipelineId, MemoryStageController.class);
        Long processId = stageController.waitForProcess(StageType.LOAD); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            return stageController.getLastData(processId);
        } else {
            logger.warn("pipelineId[{}] load ignore processId[{}] by status[{}]", new Object[] { pipelineId, processId,
                    status });
            return await(pipelineId);// 递归调用
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        MemoryStageController stageController = ArbitrateFactory.getInstance(pipelineId, MemoryStageController.class);
        Long processId = stageController.waitForProcess(StageType.SELECT); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            EtlEventData eventData = new EtlEventData();
            eventData.setPipelineId(pipelineId);
            eventData.setProcessId(processId);
            eventData.setStartTime(new Date().getTime());// 返回当前时间
            Long nid = ArbitrateConfigUtils.getCurrentNid();
View Full Code Here

        permitMonitor.waitForPermit();// 阻塞等待授权

        MemoryStageController stageController = ArbitrateFactory.getInstance(pipelineId, MemoryStageController.class);
        Long processId = stageController.waitForProcess(StageType.EXTRACT); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            return stageController.getLastData(processId);
        } else {
            logger.warn("pipelineId[{}] extract ignore processId[{}] by status[{}]", new Object[] { pipelineId,
                    processId, status });
            return await(pipelineId);// 递归调用
View Full Code Here

        if (isStop()) {
            return;
        }

        PermitMonitor permitMonitor = ArbitrateFactory.getInstance(getPipelineId(), PermitMonitor.class);
        ChannelStatus status = permitMonitor.getChannelPermit(true);
        if (status.isStop()) {
            return; // 如果已经关闭则退出
        }

        Long nid = ArbitrateConfigUtils.getCurrentNid();
        String path = StagePathUtils.getMainStem(getPipelineId());
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.common.model.config.channel.ChannelStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.