You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Mateusz Zakarczemny <m....@gmail.com> on 2019/04/12 19:42:35 UTC

[VOTE] KIP-431: Support of printing additional ConsumerRecord fields in DefaultMessageFormatter

Hi All,
This KIP is in discussion for more than a month. The feedback is positive
without any objection comments. Therefore, I would like to start voting.

https://cwiki.apache.org/confluence/display/KAFKA/KIP-431%3A+Support+of+printing+additional+ConsumerRecord+fields+in+DefaultMessageFormatter

Regards,
Mateusz Zakarczemny

Re: [VOTE] KIP-431: Support of printing additional ConsumerRecord fields in DefaultMessageFormatter

Posted by Mateusz Zakarczemny <m....@gmail.com>.
Hi Ismael,

Thanks for your questions. Answers below.

1. It would be helpful to see an example of the output with everything
enabled.

For consumer record:

new ConsumerRecord[Array[Byte], Array[Byte]](

  "someTopic",

  partition = 9,

  offset = 9876,

  timestamp = 123,

  timestampType = TimestampType.CREATE_TIME,

  checksum = 0L,

  serializedKeySize = 0,

  serializedValueSize = 0,

  key = "someKey",

  value = "someValue",

  new RecordHeaders(Seq(header("h1", "v1"), header("h2", "v2")).asJava)

)

and everything enabled:

Map("print.key" -> "true",

  "print.timestamp" -> "true",

  "print.partition" -> "true",

  "print.offset" -> "true",

  "print.headers" -> "true",

  "print.value" -> "true"),

The output would be:

"CreateTime:1234 someKey 9876 9 h1:v1,h2:v2 someValue
"


2. What are the default values for the properties (eg what's the default
header separator).

printTimestamp = false

printKey = false

printOffset = false

printPartition = false

printHeaders = false

printValue = true

keySeparator = "\t"

headersSeparator = ","

lineSeparator = "\n"


3. What is the separator used between key/value and the new fields?

There is no additional separator. keySeparator is used for separating key,
value and any new fields.
It is backward compatible behavior. keySeparator - separate key from
anything else.


Regards,
Mateusz Zakarczemny


pt., 12 kwi 2019 o 22:47 Ismael Juma <is...@juma.me.uk> napisaƂ(a):

> Hi Mateusz,
>
> The KIP looks good. Just a few of questions/suggestions:
>
> 1. It would be helpful to see an example of the output with everything
> enabled.
> 2. What are the default values for the properties (eg what's the default
> header separator).
> 3. What is the separator used between key/value and the new fields?
>
> Ismael
>
> On Fri, Apr 12, 2019 at 9:43 PM Mateusz Zakarczemny <
> m.zakarczemny@gmail.com>
> wrote:
>
> > Hi All,
> > This KIP is in discussion for more than a month. The feedback is positive
> > without any objection comments. Therefore, I would like to start voting.
> >
> >
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-431%3A+Support+of+printing+additional+ConsumerRecord+fields+in+DefaultMessageFormatter
> >
> > Regards,
> > Mateusz Zakarczemny
> >
>

Re: [VOTE] KIP-431: Support of printing additional ConsumerRecord fields in DefaultMessageFormatter

Posted by Ismael Juma <is...@juma.me.uk>.
Hi Mateusz,

The KIP looks good. Just a few of questions/suggestions:

1. It would be helpful to see an example of the output with everything
enabled.
2. What are the default values for the properties (eg what's the default
header separator).
3. What is the separator used between key/value and the new fields?

Ismael

On Fri, Apr 12, 2019 at 9:43 PM Mateusz Zakarczemny <m....@gmail.com>
wrote:

> Hi All,
> This KIP is in discussion for more than a month. The feedback is positive
> without any objection comments. Therefore, I would like to start voting.
>
>
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-431%3A+Support+of+printing+additional+ConsumerRecord+fields+in+DefaultMessageFormatter
>
> Regards,
> Mateusz Zakarczemny
>