diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java index 1623c10c10f..49ac9070fd6 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java @@ -151,6 +151,10 @@ public class ChoreService implements ChoreServicer { } try { + if (chore.getPeriod() <= 0) { + LOG.info("The period is " + chore.getPeriod() + " seconds, " + chore.getName() + " is disabled"); + return false; + } chore.setChoreServicer(this); ScheduledFuture future = scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(),