Wenzhe Zhou has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/21001 )
Change subject: IMPALA-11568: Fix SamplingTimeSeriesCounter not correctly cleared ...................................................................... IMPALA-11568: Fix SamplingTimeSeriesCounter not correctly cleared TimeSeriesCounters are scheduled in PeriodicCounterUpdater at the time when they are added. TimeSeriesCounterToJsonTest stops and clears them to avoid the update thread interfere with the rest of the test. However, the samples in SamplingTimeSeriesCounter are not cleared since it doesn't implement the Clear() method of TimeSeriesCounter. This leads to non-determined results depend on when the counter is stopped. This patch adds a Reset() method for SamplingTimeSeriesCounter to clear the samples. It's only used in the test. A Reset() method in StreamingSampler is also added for this purpose. Test: - Ran TimeSeriesCounterToJsonTest 100 times. It used to fail in 10 runs. Change-Id: I8bc2c94ad96899522b288708fcaf7413d4b99fa1 Reviewed-on: http://gerrit.cloudera.org:8080/21001 Reviewed-by: Riza Suminto <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Wenzhe Zhou <[email protected]> --- M be/src/util/runtime-profile-counters.h M be/src/util/runtime-profile-test.cc M be/src/util/runtime-profile.cc M be/src/util/streaming-sampler.h 4 files changed, 30 insertions(+), 4 deletions(-) Approvals: Riza Suminto: Looks good to me, but someone else must approve Impala Public Jenkins: Verified Wenzhe Zhou: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/21001 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8bc2c94ad96899522b288708fcaf7413d4b99fa1 Gerrit-Change-Number: 21001 Gerrit-PatchSet: 6 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Kurt Deschler <[email protected]> Gerrit-Reviewer: Laszlo Gaal <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
