From commits-return-9403-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Fri Apr 20 22:11:52 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CF37D180789 for ; Fri, 20 Apr 2018 22:11:51 +0200 (CEST) Received: (qmail 53274 invoked by uid 500); 20 Apr 2018 20:00:23 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 53262 invoked by uid 99); 20 Apr 2018 20:00:23 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2018 20:00:23 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D4EDA80A9C; Fri, 20 Apr 2018 20:00:22 +0000 (UTC) Date: Fri, 20 Apr 2018 20:00:22 +0000 To: "commits@kafka.apache.org" Subject: [kafka] branch trunk updated: MINOR: Clarify meaning of end offset in consumer javadocs (#4885) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152425442228.16697.1644104534544022591@gitbox.apache.org> From: jgus@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: kafka X-Git-Refname: refs/heads/trunk X-Git-Reftype: branch X-Git-Oldrev: 9e062b3e651bd41ad3275fb78ef577b49a108f7a X-Git-Newrev: d9e804b88952160630eb305ff05978b66cbbf49f X-Git-Rev: d9e804b88952160630eb305ff05978b66cbbf49f X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. jgus pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/trunk by this push: new d9e804b MINOR: Clarify meaning of end offset in consumer javadocs (#4885) d9e804b is described below commit d9e804b88952160630eb305ff05978b66cbbf49f Author: Arjun Satish AuthorDate: Fri Apr 20 13:00:11 2018 -0700 MINOR: Clarify meaning of end offset in consumer javadocs (#4885) Reviewers: Ismael Juma , Jason Gustafson --- .../org/apache/kafka/clients/consumer/KafkaConsumer.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java index 81137f3..0b18927 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java @@ -1646,16 +1646,14 @@ public class KafkaConsumer implements Consumer { } /** - * Get the last offset for the given partitions. The last offset of a partition is the offset of the upcoming - * message, i.e. the offset of the last available message + 1. If messages have never been written - * to the the partition, the offset returned will be 0. + * Get the end offsets for the given partitions. In the default {@code read_uncommitted} isolation level, the end + * offset is the high watermark (that is, the offset of the last successfully replicated message plus one). For + * {@code read_committed} consumers, the end offset is the last stable offset (LSO), which is the minimum of + * the high watermark and the smallest offset of any open transaction. Finally, if the partition has never been + * written to, the end offset is 0. * *

* This method does not change the current consumer position of the partitions. - *

- * When {@code isolation.level=read_committed} the last offset will be the Last Stable Offset (LSO). - * This is the offset of the first message with an open transaction. The LSO moves forward as transactions - * are completed. * * @see #seekToEnd(Collection) * -- To stop receiving notification emails like this one, please contact jgus@apache.org.