From jira-return-11294-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Wed Mar 28 21:54:04 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 1306E180671 for ; Wed, 28 Mar 2018 21:54:03 +0200 (CEST) Received: (qmail 43849 invoked by uid 500); 28 Mar 2018 19:54:03 -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 43837 invoked by uid 99); 28 Mar 2018 19:54:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2018 19:54:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 94586C0368 for ; Wed, 28 Mar 2018 19:54:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id h8IS5P_LRPhU for ; Wed, 28 Mar 2018 19:54: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 49A2D5FAE6 for ; Wed, 28 Mar 2018 19:54: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 BB1FAE08C9 for ; Wed, 28 Mar 2018 19:54: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 357A2255E7 for ; Wed, 28 Mar 2018 19:54:00 +0000 (UTC) Date: Wed, 28 Mar 2018 19:54:00 +0000 (UTC) From: "John Roesler (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6376) Improve Streams metrics for skipped records MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-6376?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1641= 8023#comment-16418023 ]=20 John Roesler commented on KAFKA-6376: ------------------------------------- Thread-level metric looks like it only counts this: org.apache.kafka.streams.processor.internals.StreamTask#addRecords: {quote}Adds records to queues. If a record has an invalid (i.e., negative) = timestamp, the record is skipped and not added to the queue for processing {quote} =C2=A0 Ah, but it drills down into=C2=A0org.apache.kafka.streams.processor.interna= ls.RecordQueue#addRawRecords where we have {quote}final ConsumerRecord record =3D recordDeserializer.d= eserialize(processorContext, rawRecord); if (record =3D=3D null) { continue; }{quote} AND {quote}// drop message if TS is invalid, i.e., negative if (timestamp < 0) { continue; }{quote} All other code paths in there either add the record or throw. =C2=A0 The former of these cases is accounted in=C2=A0org.apache.kafka.streams.pro= cessor.internals.RecordDeserializer#deserialize: {quote}... catch (final Exception deserializationException) {{quote} =C2=A0 =C2=A0 =C2=A0 > Improve Streams metrics for skipped records > ------------------------------------------- > > Key: KAFKA-6376 > URL: https://issues.apache.org/jira/browse/KAFKA-6376 > Project: Kafka > Issue Type: Improvement > Components: metrics, streams > Affects Versions: 1.0.0 > Reporter: Matthias J. Sax > Assignee: John Roesler > Priority: Major > Labels: needs-kip > > Copy this from KIP-210 discussion thread: > {quote} > Note that currently we have two metrics for `skipped-records` on differen= t > levels: > 1) on the highest level, the thread-level, we have a `skipped-records`, > that records all the skipped records due to deserialization errors. > 2) on the lower processor-node level, we have a > `skippedDueToDeserializationError`, that records the skipped records on > that specific source node due to deserialization errors. > So you can see that 1) does not cover any other scenarios and can just be > thought of as an aggregate of 2) across all the tasks' source nodes. > However, there are other places that can cause a record to be dropped, fo= r > example: > 1) https://issues.apache.org/jira/browse/KAFKA-5784: records could be > dropped due to window elapsed. > 2) KIP-210: records could be dropped on the producer side. > 3) records could be dropped during user-customized processing on errors. > {quote} > [~guozhang] Not sure what you mean by "3) records could be dropped during= user-customized processing on errors." > Btw: we also drop record with {{null}} key and/or value for certain DSL o= perations. This should be included as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)