xintongsong commented on pull request #8952:
URL: https://github.com/apache/flink/pull/8952#issuecomment-750703402


   @HuangZhenQiu, thanks for updating the PR. I'll give it another pass asap.
   
   Just to provide a quick response to your comment:
   
   I think you are right that we should not use rate per minute for checking 
against the threshold. It looks like currently `getRatePerMinute` is only 
called for logging and tests. We probably do not need to introduce this in 
`Meter`.
   * For logging, we can change `boolean exceedThreshold()` into `void 
checkAgainstThreashold() throws ThresholdExceedException`. In this way, we can 
get proper error message from the exception.
   * For testing, I think we should verify the contract of 
`TimestampBasedFailureRater` rather than its internal states. To that end, if 
we no longer need the interface `getRatePerMinute`, we don't need to test 
against it neither.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to