Thank you. Your suggestion is good and I benefit a lot. For my case, I want to know the state memory size for other reasons.
When the the gc pressure is bigger, I need to limit the source or discard some data from the source to ensure job’s running. If the state size is bigger, I need to discard data. If the state size is not bigger, I need to limit the source. The state size shows the resident memory. For event time, discarding data can reduce memory usage.
Could you please give me some suggestions?