Package com.pinterest.secor.message

Examples of com.pinterest.secor.message.ParsedMessage


        mLogFilePath = new LogFilePath(PREFIX, TOPIC, PARTITIONS, GENERATION, KAFKA_PARTITION,
                                       LAST_COMMITTED_OFFSET, "");
    }

    public void testConstructFromMessage() throws Exception {
        ParsedMessage message = new ParsedMessage(TOPIC, KAFKA_PARTITION, 1000,
                                                  "some_payload".getBytes(), PARTITIONS);
        LogFilePath logFilePath = new LogFilePath(PREFIX, GENERATION, LAST_COMMITTED_OFFSET,
                                                  message, "");
        assertEquals(PATH, logFilePath.getLogFilePath());
    }
View Full Code Here


        mConfig = config;
    }

    public ParsedMessage parse(Message message) throws Exception {
        String[] partitions = extractPartitions(message);
        return new ParsedMessage(message.getTopic(), message.getKafkaPartition(),
                                 message.getOffset(), message.getPayload(), partitions);
    }
View Full Code Here

            try {
                mMessageWriter.adjustOffset(rawMessage);
            } catch (IOException e) {
                throw new RuntimeException("Failed to adjust offset.", e);
            }
            ParsedMessage parsedMessage = null;
            try {
                parsedMessage = mMessageParser.parse(rawMessage);
                final double DECAY = 0.999;
                mUnparsableMessages *= DECAY;
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.pinterest.secor.message.ParsedMessage

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.