src/main/java/com/mapr/fuse/service/ReadDataService.java
private TopicRange calculateReadRange(final TopicPartition partition, final Long startOffset, final Long endOffset) {
        List<Integer> messagesSizes = topicSizeData.get(partition);

        MessageRange startRange =
                calculateMessageRange(messagesSizes, startOffset);

        MessageRange endRange =
                calculateMessageRange(messagesSizes, endOffset);

        return new TopicRange(startRange, endRange);
    }
/**
     * Calculates read range based on offset and number of needed bytes
     */
Calculates read range based on offset and number of needed bytes
Calculates read range based on offset and number of needed bytes
private TopicRange calculateReadRange(final TopicPartition partition, final Long startOffset, final Long endOffset) {
        List<Integer> messagesSizes = topicSizeData.get(partition);
        MessageRange startRange =
                calculateMessageRange(messagesSizes, startOffset);
        MessageRange endRange =
                calculateMessageRange(messagesSizes, endOffset);
        return new TopicRange(startRange, endRange);
    }
private TopicRange calculateReadRange ( final TopicPartition partition , final Long startOffset , final Long endOffset ) { List < Integer > messagesSizes = topicSizeData . get ( partition ) ; MessageRange startRange = calculateMessageRange ( messagesSizes , startOffset ) ; MessageRange endRange = calculateMessageRange ( messagesSizes , endOffset ) ; return new TopicRange ( startRange , endRange ) ; }
Calculates read range based on offset and number of needed bytes
Calculates read range based on offset and number of needed bytes