Examples of IZkConnection


Examples of org.I0Itec.zkclient.IZkConnection

        }
    }

    public Long getNextProcessId(Long channelId, Long pipelineId) {
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        Stat processParentStat = new Stat();
        // 获取所有的process列表
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public List<ProcessStat> listProcesses(Long channelId, Long pipelineId) {
        List<ProcessStat> processStats = new ArrayList<ProcessStat>();
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        // 获取所有的process列表
        List<String> processNodes = zookeeper.getChildren(processRoot);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public PositionEventData getCanalCursor(String destination, short clientId) {
        String path = String.format(CANAL_CURSOR_PATH, destination, String.valueOf(clientId));
        try {
            IZkConnection connection = zookeeper.getConnection();
            // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
            ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();
            Stat stat = new Stat();
            byte[] bytes = orginZk.getData(path, false, stat);
            PositionEventData eventData = new PositionEventData();
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

        // 1. 根据pipelineId + processId构造对应的path
        String path = null;
        try {
            path = StagePathUtils.getProcess(getPipelineId(), processId);
            // 2. 监听当前的process列表的变化
            IZkConnection connection = zookeeper.getConnection();
            // zkclient包装的是一个持久化的zk,分布式lock只需要一次性的watcher,需要调用原始的zk链接进行操作
            ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();
            List<String> currentStages = orginZk.getChildren(path, new AsyncWatcher() {

                public void asyncProcess(WatchedEvent event) {
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

        }
    }

    public Long getNextProcessId(Long channelId, Long pipelineId) {
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        Stat processParentStat = new Stat();
        // 获取所有的process列表
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public List<ProcessStat> listProcesses(Long channelId, Long pipelineId) {
        List<ProcessStat> processStats = new ArrayList<ProcessStat>();
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        // 获取所有的process列表
        List<String> processNodes = zookeeper.getChildren(processRoot);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public PositionEventData getCanalCursor(String destination, short clientId) {
        String path = String.format(CANAL_CURSOR_PATH, destination, String.valueOf(clientId));
        try {
            IZkConnection connection = zookeeper.getConnection();
            // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
            ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();
            Stat stat = new Stat();
            byte[] bytes = orginZk.getData(path, false, stat);
            PositionEventData eventData = new PositionEventData();
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

        }
    }

    public Long getNextProcessId(Long channelId, Long pipelineId) {
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        Stat processParentStat = new Stat();
        // 获取所有的process列表
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public List<ProcessStat> listProcesses(Long channelId, Long pipelineId) {
        List<ProcessStat> processStats = new ArrayList<ProcessStat>();
        String processRoot = ManagePathUtils.getProcessRoot(channelId, pipelineId);
        IZkConnection connection = zookeeper.getConnection();
        // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
        ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();

        // 获取所有的process列表
        List<String> processNodes = zookeeper.getChildren(processRoot);
View Full Code Here

Examples of org.I0Itec.zkclient.IZkConnection

    }

    public PositionEventData getCanalCursor(String destination, short clientId) {
        String path = String.format(CANAL_PATH, destination, String.valueOf(clientId));
        try {
            IZkConnection connection = zookeeper.getConnection();
            // zkclient会将获取stat信息和正常的操作分开,使用原生的zk进行优化
            ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();
            Stat stat = new Stat();
            byte[] bytes = orginZk.getData(path, false, stat);
            PositionEventData eventData = new PositionEventData();
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.