flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravikumar Hawaldar <ravikumar.hawal...@gmail.com>
Subject How to maintain the state of a variable in a map transformation.
Date Wed, 08 Jun 2016 15:08:06 GMT
Hello,

I have an DataSet<UserDefinedType> which is roughly a record in a DataSet
Or a file.

Now I am using map transformation on this DataSet to compute a variable
(coefficients of linear regression parameters and data structure used is a
double[]).

Now the issue is that, per record the variable will get updated and I am
struggling to maintain state of this variable for the next record.

In simple, for first record the variable values will be 0.0, and after
first record the variable will get updated and I have to pass this updated
variable for the second record and so on for all records in DataSet.

Any suggestions on how to maintain state of a variable?


Regards,
Ravikumar

Mime
View raw message