Skip to content

Commit 17348d9

Browse files
committed
todo
1 parent 61d7be5 commit 17348d9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

kafka/consumer/fetcher.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ def _retrieve_offsets(self, timestamps, timeout_ms=float("inf")):
253253
or ``timeout_ms`` passed.
254254
255255
Arguments:
256-
timestamps: {TopicPartition: int} dict with timestamps to fetch
257-
offsets by. -1 for the latest available, -2 for the earliest
258-
available. Otherwise timestamp is treated as epoch milliseconds.
256+
timestamps: {TopicPartition: (int, int)} dict with (timestamp, leader_epoch)
257+
tuples s to fetch offsets by. Timestamp is -1 for the latest available, and
258+
-2 for the earliest available. Otherwise timestamp is treated as epoch milliseconds.
259+
Leader epoch is -1 to ignore, otherwise last known epoch value from partition.
259260
260261
Returns:
261262
{TopicPartition: OffsetAndTimestamp}: Mapping of partition to
@@ -578,7 +579,8 @@ def _send_list_offsets_request(self, node_id, timestamps):
578579
by_topic = collections.defaultdict(list)
579580
for tp, timestamp in six.iteritems(timestamps):
580581
if version >= 4:
581-
data = (tp.partition, leader_epoch, timestamp)
582+
# TODO: leader_epoch
583+
data = (tp.partition, -1, timestamp)
582584
elif version >= 1:
583585
data = (tp.partition, timestamp)
584586
else:

0 commit comments

Comments
 (0)