diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java index a36e6381678..3d8de3c7001 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java @@ -799,7 +799,7 @@ public class RemoteTaskRunner implements TaskRunner, TaskLogStreamer ZkWorker zkWorker, ZkWorker zkWorker2 ) { - int retVal = -Ints.compare(zkWorker.getCurrCapacityUsed(), zkWorker2.getCurrCapacityUsed()); + int retVal = Ints.compare(zkWorker2.getCurrCapacityUsed(), zkWorker.getCurrCapacityUsed()); if (retVal == 0) { retVal = zkWorker.getWorker().getHost().compareTo(zkWorker2.getWorker().getHost()); } diff --git a/processing/src/main/java/io/druid/query/PrioritizedExecutorService.java b/processing/src/main/java/io/druid/query/PrioritizedExecutorService.java index c0dd98b6718..b1a0463d7b0 100644 --- a/processing/src/main/java/io/druid/query/PrioritizedExecutorService.java +++ b/processing/src/main/java/io/druid/query/PrioritizedExecutorService.java @@ -249,7 +249,7 @@ public class PrioritizedExecutorService extends AbstractExecutorService implemen @Override public int compareTo(PrioritizedListenableFutureTask otherTask) { - return -Ints.compare(getPriority(), otherTask.getPriority()); + return Ints.compare(otherTask.getPriority(), getPriority()); } } } diff --git a/server/src/main/java/io/druid/client/selector/HighestPriorityTierSelectorStrategy.java b/server/src/main/java/io/druid/client/selector/HighestPriorityTierSelectorStrategy.java index 13995c610f5..db0226e59cd 100644 --- a/server/src/main/java/io/druid/client/selector/HighestPriorityTierSelectorStrategy.java +++ b/server/src/main/java/io/druid/client/selector/HighestPriorityTierSelectorStrategy.java @@ -34,7 +34,7 @@ public class HighestPriorityTierSelectorStrategy extends AbstractTierSelectorStr @Override public int compare(Integer o1, Integer o2) { - return -Ints.compare(o1, o2); + return Ints.compare(o2, o1); } };