You can do it like this:
private static Function2, Optional, Optional>
UPDATEFUNCTION =
new Function2, Optional, Optional>() {
@Override
public Optional call(List nums, Optional current)
throws Exception {
long sum = current.or(0L);
for
I am trying to use updateStateByKey but receiving the following error.
(Spark Version 1.4.0)
Can someone please point out what might be the possible reason for this
error.
*The method
updateStateByKey(Function2,Optional,Optional>)
in the type JavaPairDStream is not applicable
for the arguments *