mirror of https://github.com/apache/druid.git
why am i so bad at coding
This commit is contained in:
parent
b1b9e0a267
commit
2b2b028e5c
|
@ -544,6 +544,7 @@ public class RemoteTaskRunner implements TaskRunner, TaskLogStreamer
|
|||
announceTask(task, zkWorker, taskRunnerWorkItem);
|
||||
return true;
|
||||
} else {
|
||||
log.debug("Worker nodes %s do not have capacity to run any more tasks!", zkWorkers.values());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ public class ZkWorker implements Closeable
|
|||
|
||||
public ImmutableZkWorker toImmutable()
|
||||
{
|
||||
return new ImmutableZkWorker(this);
|
||||
return new ImmutableZkWorker(worker, getCurrCapacityUsed(), getAvailabilityGroups());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,10 +24,8 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.Sets;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Inject;
|
||||
import com.metamx.emitter.EmittingLogger;
|
||||
import io.druid.indexing.common.task.Task;
|
||||
import io.druid.indexing.overlord.ImmutableZkWorker;
|
||||
import io.druid.indexing.overlord.ZkWorker;
|
||||
import io.druid.indexing.overlord.config.RemoteTaskRunnerConfig;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
@ -37,8 +35,6 @@ import java.util.TreeSet;
|
|||
*/
|
||||
public class FillCapacityWorkerSelectStrategy implements WorkerSelectStrategy
|
||||
{
|
||||
private static final EmittingLogger log = new EmittingLogger(FillCapacityWorkerSelectStrategy.class);
|
||||
|
||||
private final RemoteTaskRunnerConfig config;
|
||||
|
||||
@Inject
|
||||
|
@ -77,7 +73,6 @@ public class FillCapacityWorkerSelectStrategy implements WorkerSelectStrategy
|
|||
return Optional.of(zkWorker);
|
||||
}
|
||||
}
|
||||
log.debug("Worker nodes %s do not have capacity to run any more tasks!", zkWorkers.values());
|
||||
|
||||
return Optional.absent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue