Examples of ChannelStatus


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

            for (ChannelDO channelDo : channelDos) {
                Channel channel = new Channel();
                channel.setId(channelDo.getId());
                channel.setName(channelDo.getName());
                channel.setDescription(channelDo.getDescription());
                ChannelStatus channelStatus = arbitrateManageService.channelEvent().status(channelDo.getId());
                channel.setStatus(null == channelStatus ? ChannelStatus.STOP : channelStatus);
                channel.setParameters(channelDo.getParameters());
                channel.setGmtCreate(channelDo.getGmtCreate());
                channel.setGmtModified(channelDo.getGmtModified());
                // 遍历,将该Channel节点下的Pipeline提取出来。
View Full Code Here

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

            for (ChannelDO channelDo : channelDos) {
                Channel channel = new Channel();
                channel.setId(channelDo.getId());
                channel.setName(channelDo.getName());
                channel.setDescription(channelDo.getDescription());
                ChannelStatus channelStatus = arbitrateManageService.channelEvent().status(channelDo.getId());
                channel.setStatus(null == channelStatus ? ChannelStatus.STOP : channelStatus);
                channel.setParameters(channelDo.getParameters());
                channel.setGmtCreate(channelDo.getGmtCreate());
                channel.setGmtModified(channelDo.getGmtModified());
                // 遍历,将该Channel节点下的Pipeline提取出来。
View Full Code Here

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

            for (ChannelDO channelDo : channelDos) {
                Channel channel = new Channel();
                channel.setId(channelDo.getId());
                channel.setName(channelDo.getName());
                channel.setDescription(channelDo.getDescription());
                ChannelStatus channelStatus = arbitrateManageService.channelEvent().status(channelDo.getId());
                channel.setStatus(null == channelStatus ? ChannelStatus.STOP : channelStatus);
                channel.setParameters(channelDo.getParameters());
                channel.setGmtCreate(channelDo.getGmtCreate());
                channel.setGmtModified(channelDo.getGmtModified());
                // 遍历,将该Channel节点下的Pipeline提取出来。
View Full Code Here

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

        for (final Long channelId : channelIds) {
            futures.add(completionExecutor.submit(new Callable<Object>() {

                @Override
                public Object call() throws Exception {
                    ChannelStatus status = arbitrateManageService.channelEvent().status(channelId);
                    if (status.isPause()) {
                        restartAlarmRecovery.recovery(channelId);
                    }
                    return null;
                }
            }));
View Full Code Here

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

        }
    }

    private void serialProcess(List<Long> channelIds) {
        for (Long channelId : channelIds) {
            ChannelStatus status = arbitrateManageService.channelEvent().status(channelId);
            if (status.isPause()) {
                restartAlarmRecovery.recovery(channelId);
            }
        }
    }
View Full Code Here

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

    @Override
    public void explore(List<AlarmRule> rules) {
        Long pipelineId = rules.get(0).getPipelineId();
        Pipeline pipeline = pipelineService.findById(pipelineId);
        // 如果处于stop状态,则忽略报警
        ChannelStatus status = arbitrateManageService.channelEvent().status(pipeline.getChannelId());
        if (status == null || status.isStop()) {
            return;
        }

        List<AlarmRule> delayTimeRules = new LinkedList<AlarmRule>();
        List<AlarmRule> exceptonRules = new LinkedList<AlarmRule>();
View Full Code Here

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

    /**
     * 停止对应的channel同步,是个异步调用
     */
    public boolean pause(Long channelId, boolean needTermin) {
        ChannelStatus currstatus = status(channelId);
        boolean status = false;
        boolean result = !needTermin;
        if (currstatus.isStart()) { // stop的优先级高于pause,这里只针对start状态进行状态更新
            updateStatus(channelId, ChannelStatus.PAUSE);
            status = true; // 避免stop时发生rollback报警
        }

        if (needTermin) {
View Full Code Here

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

                    } catch (InterruptedException e) {
                        // ignore
                    }

                    Channel channel = ArbitrateConfigUtils.getChannelByChannelId(channelId);
                    ChannelStatus status = status(channel.getId());
                    if (status.isStop()) {
                        // stop优先级最高,不允许自动重启
                        logger.info("channel[{}] is already stop , restart is ignored", channel.getId());
                    } else if (canStart(channel)) { // 出现stop,就不允许进行自动重启,stop优先级最高
                        start(channelId);
                    }
View Full Code Here

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

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

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

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

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

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

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            return stageController.getLastData(processId);
        } else {
            logger.warn("pipelineId[{}] transform ignore processId[{}] by status[{}]", new Object[] { pipelineId,
                    processId, status });
            return await(pipelineId);// 递归调用
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.