Package com.taobao.metamorphosis.utils

Examples of com.taobao.metamorphosis.utils.MetaZookeeper


        // 10000);
        this.zkConfig.zkConnect = "localhost:2181";
        this.client =
                new ZkClient(this.zkConfig.zkConnect, this.zkConfig.zkSessionTimeoutMs,
                    this.zkConfig.zkConnectionTimeoutMs, new ZkUtils.StringSerializer());
        this.metaZookeeper = new MetaZookeeper(this.client, this.zkConfig.zkRoot);
        this.loadBalanceStrategy = new DefaultLoadBalanceStrategy();
        this.slaveConsumerZooKeeper =
                new SlaveConsumerZooKeeper(this.metaZookeeper, this.remotingClient, this.client, this.zkConfig,
                    this.brokerId);
    }
View Full Code Here


        log.info("Initialize zk client...");
        this.zkClient =
                new ZkClient(zkConfig.zkConnect, zkConfig.zkSessionTimeoutMs, zkConfig.zkConnectionTimeoutMs,
                    new ZkUtils.StringSerializer());
        this.zkClient.subscribeStateChanges(new SessionExpireListener());
        this.metaZookeeper = new MetaZookeeper(this.zkClient, zkConfig.zkRoot);
    }
View Full Code Here

    public void init(final String serverConf, final String jdbcConf) throws InitException {
        if (!StringUtil.empty(serverConf)) {
            try {
                this.zkConfig = this.initZkConfig(serverConf);
                this.zkClient = this.newZkClient(this.zkConfig);
                this.metaZookeeper = new MetaZookeeper(zkClient, zkConfig.zkRoot);
                this.zkQuery = new ZkOffsetStorageQuery(this.zkClient, metaZookeeper);
            }
            catch (final IOException e) {
                throw new InitException("��ʼ��zk�ͻ���ʧ��", e);
            }
View Full Code Here

    public void start() {
        if (!this.recoverOffset) {
            return;
        }

        final MetaZookeeper metaZookeeper = this.broker.getBrokerZooKeeper().getMetaZookeeper();
        final MessageStoreManager storeManager = this.broker.getStoreManager();
        final ZkClient zkClient = metaZookeeper.getZkClient();
        final String consumersPath = metaZookeeper.consumersPath;
        final Set<String> topics = this.broker.getBrokerZooKeeper().getTopics();
        final int brokerId = this.broker.getMetaConfig().getBrokerId();
        final List<String> consumers = ZkUtils.getChildrenMaybeNull(zkClient, consumersPath);
        // û�ж����ߣ�����recover
View Full Code Here

        }
        if (this.zkConfig != null) {
            this.zkClient =
                    new ZkClient(this.zkConfig.zkConnect, this.zkConfig.zkSessionTimeoutMs,
                        this.zkConfig.zkConnectionTimeoutMs, new ZkUtils.StringSerializer());
            this.metaZookeeper = new MetaZookeeper(this.zkClient, this.zkConfig.zkRoot);
        }
        else {
            throw new MetaClientException("No zk config offered");
        }
    }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.utils.MetaZookeeper

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.