From 95a13b51ee052eb73882682e8f009bfa1e914866 Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Tue, 22 Dec 2015 02:04:09 -0800 Subject: [PATCH] HBASE-14977 ChoreService.shutdown may result in ConcurrentModificationException - ADDENDUM to fix extra concurrency issues --- .../java/org/apache/hadoop/hbase/ScheduledChore.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java index 538b3905bbb..dd98d26565b 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java @@ -228,7 +228,7 @@ public abstract class ScheduledChore implements Runnable { && getTimeBetweenRuns() > getMaximumAllowedTimeBetweenRuns(); } - private synchronized double getMaximumAllowedTimeBetweenRuns() { + private double getMaximumAllowedTimeBetweenRuns() { // Threshold used to determine if the Chore's current run started too late return 1.5 * period; } @@ -268,23 +268,23 @@ public abstract class ScheduledChore implements Runnable { choreServicer = null; } - public synchronized String getName() { + public String getName() { return name; } - public synchronized Stoppable getStopper() { + public Stoppable getStopper() { return stopper; } - public synchronized int getPeriod() { + public int getPeriod() { return period; } - public synchronized long getInitialDelay() { + public long getInitialDelay() { return initialDelay; } - public final synchronized TimeUnit getTimeUnit() { + public TimeUnit getTimeUnit() { return timeUnit; }