Package com.pinterest.secor.common

Examples of com.pinterest.secor.common.OffsetTracker


        while (true) {
            for (Consumer consumer : consumers) {
                for (String topic : topics) {
                    for (int i = 0; i < num_partitions; i++) {
                        OffsetTracker offsetTracker = consumer
                                .getOffsetTracker();
                        long val = (offsetTracker == null) ? -1
                                : offsetTracker
                                        .getLastSeenOffset(new TopicPartition(
                                                topic, i)) + 1;

                        System.out.println("topic:" + topic + " partition:" + i
                                + " secor offset:" + val + " elapsed:"
View Full Code Here


    public Consumer(SecorConfig config) {
        mConfig = config;
    }

    private void init() throws Exception {
        mOffsetTracker = new OffsetTracker();
        mMessageReader = new MessageReader(mConfig, mOffsetTracker);
        FileRegistry fileRegistry = new FileRegistry(mConfig);
        mMessageWriter = new MessageWriter(mConfig, mOffsetTracker, fileRegistry);
        mMessageParser = (MessageParser) ReflectionUtil.createMessageParser(
                mConfig.getMessageParserClass(), mConfig);
View Full Code Here

TOP

Related Classes of com.pinterest.secor.common.OffsetTracker

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.