Package com.taobao.metamorphosis.cluster

Examples of com.taobao.metamorphosis.cluster.Broker


        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final int msgId = 1111;
        final byte[] data =
                MessageUtils.makeMessageBuffer(msgId,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
View Full Code Here


        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final int msgId = 1111;
        final byte[] data =
                MessageUtils.makeMessageBuffer(msgId,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
View Full Code Here

        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final int msgId = 1111;
        final byte[] data =
                makeInvalidMessageBuffer(msgId,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
View Full Code Here

        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final byte[] data =
                MessageUtils.makeMessageBuffer(1111,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
                new FetchRequest(broker, 0, new TopicPartitionRegInfo(topic, partition, offset), maxSize);
View Full Code Here

        // this.mockConsumerReInitializeFetchManager();
        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final FetchRequest request =
                new FetchRequest(broker, 0, new TopicPartitionRegInfo(topic, partition, offset), maxSize);

        final FetchRequestRunner runner = this.fetchManager.new FetchRequestRunner();
        EasyMock.expect(this.consumer.fetch(request, -1, null)).andReturn(null);
View Full Code Here

        // this.mockConsumerReInitializeFetchManager();
        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final byte[] data =
                MessageUtils.makeMessageBuffer(1111,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
                new FetchRequest(broker, 0, new TopicPartitionRegInfo(topic, partition, offset), maxSize);
View Full Code Here

        // this.mockConsumerReInitializeFetchManager();
        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final byte[] data =
                MessageUtils.makeMessageBuffer(1111,
                    new PutCommand(topic, partition.getPartition(), "hello".getBytes(), null, 0, 0)).array();
        final FetchRequest request =
                new FetchRequest(broker, 0, new TopicPartitionRegInfo(topic, partition, offset), maxSize);
View Full Code Here

        this.consumerConfig.setMaxIncreaseFetchDataRetries(0);
        final String topic = "topic1";
        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final Broker broker = new Broker(0, "meta://localhost:0");
        final FetchRequest request =
                new FetchRequest(broker, 0, new TopicPartitionRegInfo(topic, partition, offset), maxSize);
        // ��������������0��
        request.incrementRetriesAndGet();
View Full Code Here

        this.getZkClient().subscribeDataChanges(this.masterConfigFileChecksumPath, this.masterBrokerIdListener);
    }


    public String getMasterServerUrl() {
        final Broker masterBroker =
                this.getMetaZookeeper().getMasterBrokerById(this.broker.getMetaConfig().getBrokerId());
        return masterBroker != null ? masterBroker.getZKString() : null;
    }
View Full Code Here

        final int maxSize = 1024;
        final Partition partition = new Partition("0-0");
        final long offset = 12;
        final String url = "meta://localhost:8123";

        final Broker broker = new Broker(1, url);
        final long delay = 0;
        final TopicPartitionRegInfo topicPartitionRegInfo = new TopicPartitionRegInfo(topic, partition, offset);
        EasyMock.expect(
            this.remotingClient.invokeToGroup(url,
                new OffsetCommand(topic, this.consumerConfig.getGroup(), partition.getPartition(), offset,
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.cluster.Broker

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.