Fix small div-by-zero exception found in an FB test cluster
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1050226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
605ebb05ec
commit
28012b50ce
|
@ -128,7 +128,7 @@ public class PersistentMetricsTimeVaryingRate extends MetricsTimeVaryingRate {
|
|||
if (curOps > 0) {
|
||||
long curTime = this.getPreviousIntervalAverageTime();
|
||||
long totalTime = curTime * curOps;
|
||||
if (totalTime / curTime == curOps) {
|
||||
if (curTime == 0 || totalTime / curTime == curOps) {
|
||||
super.inc(curOps, totalTime);
|
||||
} else {
|
||||
LOG.info("Stats for " + this.getName() + " overflowed! resetting");
|
||||
|
|
Loading…
Reference in New Issue