revert last commit

This commit is contained in:
Fangjin Yang 2012-12-11 17:20:23 -08:00
parent 143de953fc
commit 127b632421
1 changed files with 4 additions and 4 deletions

View File

@ -105,8 +105,8 @@ public class DruidMasterBalancer implements DruidMasterHelper
continue; continue;
} }
MinMaxPriorityQueue<ServerHolder> serversByPercentUsed = MinMaxPriorityQueue.orderedBy(percentUsedComparator) TreeSet<ServerHolder> serversByPercentUsed = Sets.newTreeSet(percentUsedComparator);
.create(entry.getValue()); serversByPercentUsed.addAll(entry.getValue());
if (serversByPercentUsed.size() <= 1) { if (serversByPercentUsed.size() <= 1) {
log.info( log.info(
@ -116,8 +116,8 @@ public class DruidMasterBalancer implements DruidMasterHelper
continue; continue;
} }
ServerHolder highestPercentUsedServer = serversByPercentUsed.peekFirst(); ServerHolder highestPercentUsedServer = serversByPercentUsed.first();
ServerHolder lowestPercentUsedServer = serversByPercentUsed.peekLast(); ServerHolder lowestPercentUsedServer = serversByPercentUsed.last();
analyzer.init(highestPercentUsedServer, lowestPercentUsedServer); analyzer.init(highestPercentUsedServer, lowestPercentUsedServer);