Re: Flink metrics related problems/questions

2017-05-22 Thread Aljoscha Krettek
Ah ok, the onTimer() and processElement() methods are all protected by synchronized blocks on the same lock. So that shouldn’t be a problem. > On 22. May 2017, at 15:08, Chesnay Schepler wrote: > > Yes, that could cause the observed issue. > > The default implementations are not thread-safe; i

Re: Flink metrics related problems/questions

2017-05-22 Thread Chesnay Schepler
Yes, that could cause the observed issue. The default implementations are not thread-safe; if you do concurrent writes they may be lost/overwritten. You will have to either guard accesses to that metric with a synchronized block or implement your own thread-safe counter. On 22.05.2017 14:17,

Re: Flink metrics related problems/questions

2017-05-22 Thread Aljoscha Krettek
@Chesnay With timers it will happen that onTimer() is called from a different Thread than the Tread that is calling processElement(). If Metrics updates happen in both, would that be a problem? > On 19. May 2017, at 11:57, Chesnay Schepler wrote: > > 2. isn't quite accurate actually; metrics o

Re: Flink metrics related problems/questions

2017-05-19 Thread Chesnay Schepler
2. isn't quite accurate actually; metrics on the TaskManager are not persisted across restarts. On 19.05.2017 11:21, Chesnay Schepler wrote: 1. This shouldn't happen. Do you access the counter from different threads? 2. Metrics in general are not persisted across restarts, and there is no wa

Re: Flink metrics related problems/questions

2017-05-19 Thread Chesnay Schepler
1. This shouldn't happen. Do you access the counter from different threads? 2. Metrics in general are not persisted across restarts, and there is no way to configure flink to do so at the moment. 3. Counters are sent as gauges since as far as I know StatsD counters are not allowed to be decre