Examples of waitForProcess()


Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.TerminMonitor.waitForProcess()

     * </pre>
     */
    public TerminEventData await(Long pipelineId) throws InterruptedException {
        Assert.notNull(pipelineId);
        TerminMonitor terminMonitor = ArbitrateFactory.getInstance(pipelineId, TerminMonitor.class);
        Long processId = terminMonitor.waitForProcess(); // 符合条件的processId
        if (logger.isDebugEnabled()) {
            logger.debug("## await pipeline[{}] processId[{}] is termin", pipelineId, processId);
        }

        // 根据pipelineId+processId构造对应的path
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.TerminMonitor.waitForProcess()

        TerminMonitor terminMonitor = ArbitrateFactory.getInstance(pipelineId, TerminMonitor.class);
        int size = terminMonitor.size();
        try {
            for (int i = 0; i < size; i++) {
                Long processId;
                processId = terminMonitor.waitForProcess();
                TerminEventData data = new TerminEventData();
                data.setPipelineId(pipelineId);
                data.setProcessId(processId);
                ack(data);
            }
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.rpc.monitor.SelectProcessListener.waitForProcess()

        PermitMonitor permitMonitor = ArbitrateFactory.getInstance(pipelineId, PermitMonitor.class);
        permitMonitor.waitForPermit();// 阻塞等待授权

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

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变
            try {
                EtlEventData eventData = new EtlEventData();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.ExtractStageListener.waitForProcess()

        Assert.notNull(pipelineId);
        PermitMonitor permitMonitor = ArbitrateFactory.getInstance(pipelineId, PermitMonitor.class);
        permitMonitor.waitForPermit();// 阻塞等待授权

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

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

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.ExtractStageListener.waitForProcess()

            List<String> p4Stages = Arrays.asList(ArbitrateConstants.NODE_SELECTED);
            stages.put(p4, p4Stages);

            // 进行验证
            ExtractStageListener extract = new ExtractStageListener(pipelineId);
            Long processId = extract.waitForProcess();
            want.number(processId).isEqualTo(p2);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.ExtractStageListener.waitForProcess()

            List<String> p6Stages = Lists.newArrayList();
            stages.put(p6, p6Stages);

            sleep();// sleep一下,等待数据同步
            // 进行验证
            Long processId = extract.waitForProcess();
            want.number(processId).isEqualTo(p4);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.LoadStageListener.waitForProcess()

                                                  ArbitrateConstants.NODE_TRANSFORMED);
            stages.put(p2, p2Stages);

            // 进行验证
            LoadStageListener load = new LoadStageListener(pipelineId);
            Long processId = load.waitForProcess();
            want.number(processId).isEqualTo(p1);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.LoadStageListener.waitForProcess()

                                                  ArbitrateConstants.NODE_TRANSFORMED);
            stages.put(p3, p3Stages);

            sleep();
            // 进行验证
            Long processId = load.waitForProcess();
            want.number(processId).isEqualTo(p2);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.LoadStageListener.waitForProcess()

            p2Stages = Lists.newArrayList();
            stages.put(p2, p2Stages);

            sleep();
            // 进行验证
            processId = load.waitForProcess();
            want.number(processId).isEqualTo(p3);

            // 验证下process信息
            processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.LoadStageListener.waitForProcess()

        Assert.notNull(pipelineId);
        PermitMonitor permitMonitor = ArbitrateFactory.getInstance(pipelineId, PermitMonitor.class);
        permitMonitor.waitForPermit();// 阻塞等待授权

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

        // DistributedLock lock = getLock(pipelineId);
        try {
            // 使用锁的理由:
            // 1. 针对双向同步时,其中一个方向出现了异常,需要发起另一端的关闭,此时对方正好在执行某个process的load
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.