public class FillCapacityWithAffinityWorkerSelectStrategy extends FillCapacityWorkerSelectStrategy
Constructor and Description |
---|
FillCapacityWithAffinityWorkerSelectStrategy(FillCapacityWithAffinityConfig affinityConfig) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
com.google.common.base.Optional<ImmutableWorkerInfo> |
findWorkerForTask(WorkerTaskRunnerConfig config,
com.google.common.collect.ImmutableMap<String,ImmutableWorkerInfo> zkWorkers,
Task task)
Customizable logic for selecting a worker to run a task.
|
FillCapacityWithAffinityConfig |
getAffinityConfig() |
int |
hashCode() |
public FillCapacityWithAffinityWorkerSelectStrategy(FillCapacityWithAffinityConfig affinityConfig)
public FillCapacityWithAffinityConfig getAffinityConfig()
public com.google.common.base.Optional<ImmutableWorkerInfo> findWorkerForTask(WorkerTaskRunnerConfig config, com.google.common.collect.ImmutableMap<String,ImmutableWorkerInfo> zkWorkers, Task task)
WorkerSelectStrategy
findWorkerForTask
in interface WorkerSelectStrategy
findWorkerForTask
in class FillCapacityWorkerSelectStrategy
config
- A config for running remote taskszkWorkers
- An immutable map of workers to choose from.task
- The task to assign.ImmutableWorkerInfo
to run the task if one is available.Copyright © 2011–2017. All rights reserved.