Skip to content

Commit

Permalink
[hotfix] Properly copy stream record in ReducingWindowBuffer and Fold…
Browse files Browse the repository at this point in the history
…ingWindowBuffer
  • Loading branch information
StephanEwen committed Feb 29, 2016
1 parent f881e70 commit 405d222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected FoldingWindowBuffer(FoldFunction<T, ACC> foldFunction, StreamRecord<AC

@Override
public void storeElement(StreamRecord<T> element) throws Exception {
data.replace(foldFunction.fold(data.getValue(), element.getValue()), element.getTimestamp());
data.replace(foldFunction.fold(data.getValue(), element.getValue()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected ReducingWindowBuffer(ReduceFunction<T> reduceFunction, StreamRecord<T>
@Override
public void storeElement(StreamRecord<T> element) throws Exception {
if (data == null) {
data = new StreamRecord<>(element.getValue(), element.getTimestamp());
data = element.copy(element.getValue());
} else {
data.replace(reduceFunction.reduce(data.getValue(), element.getValue()));
}
Expand Down

0 comments on commit 405d222

Please sign in to comment.