From e4c43d72bf5660d1ae343a09be574b0d499216be Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 9 Mar 2012 22:47:54 +0000 Subject: [PATCH] HBASE-5535 Make the functions in task monitor synchronized git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299088 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java b/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java index bdb754a5795..1cbc84a4726 100644 --- a/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java +++ b/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java @@ -66,7 +66,7 @@ public class TaskMonitor { return instance; } - public MonitoredTask createStatus(String description) { + public synchronized MonitoredTask createStatus(String description) { MonitoredTask stat = new MonitoredTaskImpl(); stat.setDescription(description); MonitoredTask proxy = (MonitoredTask) Proxy.newProxyInstance( @@ -80,7 +80,7 @@ public class TaskMonitor { return proxy; } - public MonitoredRPCHandler createRPCStatus(String description) { + public synchronized MonitoredRPCHandler createRPCStatus(String description) { MonitoredRPCHandler stat = new MonitoredRPCHandlerImpl(); stat.setDescription(description); MonitoredRPCHandler proxy = (MonitoredRPCHandler) Proxy.newProxyInstance(