You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2014/07/16 22:27:33 UTC
git commit: ACCUMULO-2998 updates based on offline comments from
[~kturner]
Repository: accumulo
Updated Branches:
refs/heads/master f0a67188f -> 3af9e60d7
ACCUMULO-2998 updates based on offline comments from [~kturner]
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3af9e60d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3af9e60d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3af9e60d
Branch: refs/heads/master
Commit: 3af9e60d703cb2d99bbb9d9535b4ad46de2c9475
Parents: f0a6718
Author: Eric C. Newton <er...@gmail.com>
Authored: Wed Jul 16 16:27:18 2014 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Wed Jul 16 16:27:18 2014 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/master/Master.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af9e60d/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index ff8390a..c599a3d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -164,7 +164,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
final VolumeManager fs;
final private Instance instance;
final private String hostname;
- final private Object balanceLock = new Object();
+ final private Object balancedNotifier = new Object();
final LiveTServerSet tserverSet;
final private List<TabletGroupWatcher> watchers = new ArrayList<TabletGroupWatcher>();
final SecurityOperation security;
@@ -871,8 +871,8 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
if (migrationsOut.size() > 0) {
nextEvent.event("Migrating %d more tablets, %d total", migrationsOut.size(), migrations.size());
} else {
- synchronized (balanceLock) {
- balanceLock.notify();
+ synchronized (balancedNotifier) {
+ balancedNotifier.notifyAll();
}
}
return wait;
@@ -1314,14 +1314,14 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
}
public void waitForBalance(TInfo tinfo) {
- synchronized (balanceLock) {
- while (displayUnassigned() > 0 || migrations.size() > 0) {
+ synchronized (balancedNotifier) {
+ do {
try {
- balanceLock.wait();
+ balancedNotifier.wait();
} catch (InterruptedException e) {
log.debug(e.toString(), e);
}
- }
+ } while (displayUnassigned() > 0 || migrations.size() > 0);
}
}
}