Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4D791200CC8 for ; Fri, 30 Jun 2017 00:19:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4C462160BFB; Thu, 29 Jun 2017 22:19:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 943F0160BED for ; Fri, 30 Jun 2017 00:19:03 +0200 (CEST) Received: (qmail 88886 invoked by uid 500); 29 Jun 2017 22:19:02 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 88875 invoked by uid 99); 29 Jun 2017 22:19:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2017 22:19:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4F788180351 for ; Thu, 29 Jun 2017 22:19:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id FS2CS5Yr69ft for ; Thu, 29 Jun 2017 22:19:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 121CE5FC6C for ; Thu, 29 Jun 2017 22:19:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8022FE0026 for ; Thu, 29 Jun 2017 22:19:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3E16E24165 for ; Thu, 29 Jun 2017 22:19:00 +0000 (UTC) Date: Thu, 29 Jun 2017 22:19:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-5534) KafkaConsumer offsetsForTimes should include partitions in result even if no offset could be found MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 29 Jun 2017 22:19:04 -0000 [ https://issues.apache.org/jira/browse/KAFKA-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16069090#comment-16069090 ] ASF GitHub Bot commented on KAFKA-5534: --------------------------------------- GitHub user vahidhashemian opened a pull request: https://github.com/apache/kafka/pull/3460 KAFKA-5534: `offsetForTimes` result should include partitions with no offset For topics that support timestamp search, if no offset is found for a partition, the partition should still be included in the result with a `null` offset value. This `KafkaConsumer` method currently excludes such partitions from the result. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-5534 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3460.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3460 ---- commit 504b42c7acf6278de8ab19b4b78fea95e898a084 Author: Vahid Hashemian Date: 2017-06-29T22:12:45Z KAFKA-5534: `offsetForTimes` result should include partitions with no offsets For topics that support timestamp search, if no offset is found for a partition, the partition should still be included in the result with a `null` offset value. ---- > KafkaConsumer offsetsForTimes should include partitions in result even if no offset could be found > -------------------------------------------------------------------------------------------------- > > Key: KAFKA-5534 > URL: https://issues.apache.org/jira/browse/KAFKA-5534 > Project: Kafka > Issue Type: Bug > Components: consumer > Reporter: Jason Gustafson > Assignee: Vahid Hashemian > Fix For: 0.11.0.1 > > > From the javadoc for {{offsetsForTimes}}: > {code} > * @return a mapping from partition to the timestamp and offset of the first message with timestamp greater > * than or equal to the target timestamp. {@code null} will be returned for the partition if there is no > * such message. > {code} > If the topic does not support timestamp search (i.e. magic 1 and above), we include the partition in the map with a null value, as described above. If the topic supports timestamp search but no offset could be found, we just leave the partition out of the map. We should make this behavior consistent and include the partition with a null value in the result. -- This message was sent by Atlassian JIRA (v6.4.14#64029)