mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
fix bug where workers with same capacity would not be unique
This commit is contained in:
parent
99a3de1597
commit
795657aedf
@ -689,7 +689,12 @@ public class RemoteTaskRunner implements TaskRunner, TaskLogProvider
|
||||
ZkWorker zkWorker, ZkWorker zkWorker2
|
||||
)
|
||||
{
|
||||
return -Ints.compare(zkWorker.getCurrCapacityUsed(), zkWorker2.getCurrCapacityUsed());
|
||||
int retVal = -Ints.compare(zkWorker.getCurrCapacityUsed(), zkWorker2.getCurrCapacityUsed());
|
||||
if (retVal == 0) {
|
||||
retVal = zkWorker.getWorker().getHost().compareTo(zkWorker.getWorker().getHost());
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user