Examples of StageMonitor


Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            // 进行验证
            Long processId = extract.waitForProcess();
            want.number(processId).isEqualTo(p4);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);
            List<String> currentP3Stages = monitor.getCurrentStages(p3);
            List<String> currentP4Stages = monitor.getCurrentStages(p4);
            List<String> currentP5Stages = monitor.getCurrentStages(p5);
            List<String> currentP6Stages = monitor.getCurrentStages(p6);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            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();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            load.destory();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

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

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);
            List<String> currentP3Stages = monitor.getCurrentStages(p3);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));

            // 继续变化
            // initStage(p2, ArbitrateConstants.NODE_LOADED);
            destoryStage(p2, ArbitrateConstants.NODE_SELECTED);
            destoryStage(p2, ArbitrateConstants.NODE_EXTRACTED);
            destoryStage(p2, ArbitrateConstants.NODE_TRANSFORMED);
            // destoryStage(p2, ArbitrateConstants.NODE_LOADED);
            destoryProcess(p2);

            // 准备清理数据
            initProcessIds.remove(p2);

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

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

            // 验证下process信息
            processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            currentP1Stages = monitor.getCurrentStages(p1);
            currentP2Stages = monitor.getCurrentStages(p2);
            currentP3Stages = monitor.getCurrentStages(p3);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            Long p4 = select.waitForProcess();
            initProcessIds.add(p2);
            initProcessIds.add(p3);
            initProcessIds.add(p4);

            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();

            want.collection(processIds).isEqualTo(initProcessIds);
            select.destory();
            ArbitrateFactory.destory(pipelineId);
        } catch (InterruptedException e) {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            Long p5 = select.waitForProcess();
            initProcessIds.add(p4);
            initProcessIds.add(p5);

            sleep();
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
            want.collection(processIds).isEqualTo(initProcessIds);
            count.await();
            select.destory();
            ArbitrateFactory.destory(pipelineId);
        } catch (InterruptedException e) {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            TransformStageListener transform = new TransformStageListener(pipelineId);
            Long processId = transform.waitForProcess();
            want.number(processId).isEqualTo(p2);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);
            List<String> currentP3Stages = monitor.getCurrentStages(p3);
            List<String> currentP4Stages = monitor.getCurrentStages(p4);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

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

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);
            List<String> currentP3Stages = monitor.getCurrentStages(p3);
            List<String> currentP4Stages = monitor.getCurrentStages(p4);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            stages.put(p1, p1Stages);
            initStage(p2, ArbitrateConstants.NODE_SELECTED);
            List<String> p2Stages = Arrays.asList(ArbitrateConstants.NODE_SELECTED);
            stages.put(p2, p2Stages);

            StageMonitor monitor = new StageMonitor(pipelineId);
            List<Long> processIds = monitor.getCurrentProcessIds();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
        } finally {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.StageMonitor

            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();
            // 获取下stage信息
            List<String> currentP1Stages = monitor.getCurrentStages(p1);
            List<String> currentP2Stages = monitor.getCurrentStages(p2);
            List<String> currentP3Stages = monitor.getCurrentStages(p3);
            List<String> currentP4Stages = monitor.getCurrentStages(p4);

            want.collection(processIds).isEqualTo(initProcessIds);
            want.collection(currentP1Stages).isEqualTo(stages.get(p1));
            want.collection(currentP2Stages).isEqualTo(stages.get(p2));
            want.collection(currentP3Stages).isEqualTo(stages.get(p3));
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.