Skip to content

Commit

Permalink
Remove 'Heller::' in Heller::Consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
mthssdrbrg committed Jan 5, 2014
1 parent 26920b1 commit fd3c09f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/heller/consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def fetch(fetch_requests, fetch_size = DEFAULT_FETCH_SIZE)
def metadata(topics)
unless topics.empty?
request = Kafka::JavaApi::TopicMetadataRequest.new(topics)
Heller::TopicMetadataResponse.new(@consumer.send(request))
TopicMetadataResponse.new(@consumer.send(request))
end
end

Expand All @@ -44,17 +44,17 @@ def offsets_before(offset_requests)
memo[topic_partition] = partition_offset
end

request = Kafka::JavaApi::OffsetRequest.new(request_info, Heller::OffsetRequest.current_version, client_id)
Heller::OffsetResponse.new(@consumer.get_offsets_before(request))
request = Kafka::JavaApi::OffsetRequest.new(request_info, OffsetRequest.current_version, client_id)
OffsetResponse.new(@consumer.get_offsets_before(request))
end

def earliest_offset(topic, partition)
response = offsets_before(Heller::OffsetRequest.new(topic, partition, Heller::OffsetRequest.earliest_time))
response = offsets_before(OffsetRequest.new(topic, partition, OffsetRequest.earliest_time))
response.offsets(topic, partition).first
end

def latest_offset(topic, partition)
response = offsets_before(Heller::OffsetRequest.new(topic, partition, Heller::OffsetRequest.latest_time))
response = offsets_before(OffsetRequest.new(topic, partition, OffsetRequest.latest_time))
response.offsets(topic, partition).last
end

Expand Down

0 comments on commit fd3c09f

Please sign in to comment.