You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lee Dongjin (JIRA)" <ji...@apache.org> on 2019/02/10 08:46:00 UTC
[jira] [Comment Edited] (KAFKA-7911) Add Timezone Support for
Windowed Aggregations
[ https://issues.apache.org/jira/browse/KAFKA-7911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16764346#comment-16764346 ]
Lee Dongjin edited comment on KAFKA-7911 at 2/10/19 8:45 AM:
-------------------------------------------------------------
[~mjsax] So... something like the following is needed. Right?
{{kStream}}
{{.windowedBy(TimeZone.getTimeZone("America/Los_Angeles"), TimeWindows.of(Duration.ofDays(7)).advanceBy(Duration.ofSeconds(1)))}}
or,
{{kStream}}
{{.withTimeZone(TimeZone.getTimeZone("America/Los_Angeles"))}}
{{.windowedBy(TimeWindows.of(Duration.ofDays(7)).advanceBy(Duration.ofSeconds(1)))}}
The first approach is easy to implement, but the second one has a little bit more clear syntax. Which one would be better?
was (Author: dongjin.lee.kr):
[~mjsax] So... something like the following is needed. Right?
{{kStream}}
{{ .windowedBy(TimeZone.getTimeZone("America/Los_Angeles"), TimeWindows.of(Duration.ofDays(7)).advanceBy(Duration.ofSeconds(1)))}}
or,
{{kStream}}
{{ .withTimeZone(TimeZone.getTimeZone("America/Los_Angeles"))}}
{{ .windowedBy(TimeWindows.of(Duration.ofDays(7)).advanceBy(Duration.ofSeconds(1)))}}
The first approach is easy to implement, but the second one has a little bit more clear syntax. Which one would be better?
> Add Timezone Support for Windowed Aggregations
> ----------------------------------------------
>
> Key: KAFKA-7911
> URL: https://issues.apache.org/jira/browse/KAFKA-7911
> Project: Kafka
> Issue Type: New Feature
> Components: streams
> Reporter: Matthias J. Sax
> Priority: Minor
> Labels: needs-kip
>
> Currently, Kafka Streams only support UTC timestamps. The impact is, that `TimeWindows` are based on UTC time only. This is problematic for 24h windows, because windows are build aligned to UTC-days, but not your local time zone.
> While it's possible to "shift" timestamps as a workaround, it would be better to allow native timezone support.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)