Skip to content

remove beginning/end offsets request version limit #1200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions kafka/consumer/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,6 @@ def beginning_offsets(self, partitions):
up the offsets by timestamp.
KafkaTimeoutError: If fetch failed in request_timeout_ms.
"""
if self.config['api_version'] <= (0, 10, 0):
raise UnsupportedVersionError(
"offsets_for_times API not supported for cluster version {}"
.format(self.config['api_version']))
offsets = self._fetcher.beginning_offsets(
partitions, self.config['request_timeout_ms'])
return offsets
Expand Down Expand Up @@ -959,10 +955,6 @@ def end_offsets(self, partitions):
up the offsets by timestamp.
KafkaTimeoutError: If fetch failed in request_timeout_ms
"""
if self.config['api_version'] <= (0, 10, 0):
raise UnsupportedVersionError(
"offsets_for_times API not supported for cluster version {}"
.format(self.config['api_version']))
offsets = self._fetcher.end_offsets(
partitions, self.config['request_timeout_ms'])
return offsets
Expand Down
6 changes: 0 additions & 6 deletions test/test_consumer_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,6 @@ def test_kafka_consumer_offsets_for_time_old(self):
with self.assertRaises(UnsupportedVersionError):
consumer.offsets_for_times({tp: int(time.time())})

with self.assertRaises(UnsupportedVersionError):
consumer.beginning_offsets([tp])

with self.assertRaises(UnsupportedVersionError):
consumer.end_offsets([tp])

@kafka_versions('>=0.10.1')
def test_kafka_consumer_offsets_for_times_errors(self):
consumer = self.kafka_consumer()
Expand Down