[jira] [Updated] (KAFKA-6486) TimeWindows causes unordered calls to windowed aggregation functions
[ https://issues.apache.org/jira/browse/KAFKA-6486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthias J. Sax updated KAFKA-6486: --- Fix Version/s: 1.2.0 > TimeWindows causes unordered calls to windowed aggregation functions > > > Key: KAFKA-6486 > URL: https://issues.apache.org/jira/browse/KAFKA-6486 > Project: Kafka > Issue Type: Improvement > Components: streams >Affects Versions: 1.0.0 >Reporter: Valentino Proietti >Priority: Minor > Fix For: 1.2.0 > > Attachments: KAFKA-6486.patch > > > This is not a real bug but it causes some weird behaviour, at least in my > opinion. > The TimeWindows has a method called windowsFor() that uses and returns an > HashMap: > @Override > *public* MapwindowsFor(*final* *long* timestamp) { > *long* windowStart = (Math._max_(0, timestamp - sizeMs + advanceMs) / > advanceMs) * advanceMs; > *final* Map windows = *new* HashMap<>(); > > the HashMap does not preserve the order of insertion and this ends up later > in calls to any streams windowed aggregation functions that are not ordered > by window time as I would expect. > A simple solution is to replace the HashMap with a LinkedHashMap and that's > what I did. > Anyway replacing it directly in your code can save hours of debugging to > understand what's happening. > Thank you > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KAFKA-6486) TimeWindows causes unordered calls to windowed aggregation functions
[ https://issues.apache.org/jira/browse/KAFKA-6486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Asutosh Pandya updated KAFKA-6486: -- Attachment: KAFKA-6486.patch > TimeWindows causes unordered calls to windowed aggregation functions > > > Key: KAFKA-6486 > URL: https://issues.apache.org/jira/browse/KAFKA-6486 > Project: Kafka > Issue Type: Improvement > Components: streams >Affects Versions: 1.0.0 >Reporter: Valentino Proietti >Priority: Minor > Attachments: KAFKA-6486.patch > > > This is not a real bug but it causes some weird behaviour, at least in my > opinion. > The TimeWindows has a method called windowsFor() that uses and returns an > HashMap: > @Override > *public* MapwindowsFor(*final* *long* timestamp) { > *long* windowStart = (Math._max_(0, timestamp - sizeMs + advanceMs) / > advanceMs) * advanceMs; > *final* Map windows = *new* HashMap<>(); > > the HashMap does not preserve the order of insertion and this ends up later > in calls to any streams windowed aggregation functions that are not ordered > by window time as I would expect. > A simple solution is to replace the HashMap with a LinkedHashMap and that's > what I did. > Anyway replacing it directly in your code can save hours of debugging to > understand what's happening. > Thank you > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (KAFKA-6486) TimeWindows causes unordered calls to windowed aggregation functions
[ https://issues.apache.org/jira/browse/KAFKA-6486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthias J. Sax updated KAFKA-6486: --- Issue Type: Improvement (was: Bug) > TimeWindows causes unordered calls to windowed aggregation functions > > > Key: KAFKA-6486 > URL: https://issues.apache.org/jira/browse/KAFKA-6486 > Project: Kafka > Issue Type: Improvement > Components: streams >Affects Versions: 1.0.0 >Reporter: Valentino Proietti >Priority: Minor > > This is not a real bug but it causes some weird behaviour, at least in my > opinion. > The TimeWindows has a method called windowsFor() that uses and returns an > HashMap: > @Override > *public* MapwindowsFor(*final* *long* timestamp) { > *long* windowStart = (Math._max_(0, timestamp - sizeMs + advanceMs) / > advanceMs) * advanceMs; > *final* Map windows = *new* HashMap<>(); > > the HashMap does not preserve the order of insertion and this ends up later > in calls to any streams windowed aggregation functions that are not ordered > by window time as I would expect. > A simple solution is to replace the HashMap with a LinkedHashMap and that's > what I did. > Anyway replacing it directly in your code can save hours of debugging to > understand what's happening. > Thank you > -- This message was sent by Atlassian JIRA (v7.6.3#76005)