THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
// '+' denotes addition, '-' denotes deletion.
public interface TaskNameGrouper {
+ @deprecated
Set<ContainerModel> group(Set<TaskModel> tasks);
+ @deprecated
default Set<ContainerModel> group(Set<TaskModel> tasks, List<String> containersIds) {
return group(tasks);
}
+ Set<ContainerModel> group(Set<TaskModel> currentGenerationTaskModels, List<String> currentGenerationProcessorIds, Set<ContainerModel> previousGenerationContainerModels);
}
public interface BalancingTaskNameGrouper extends TaskNameGrouper {
+ @deprecated
Set<ContainerModel> balance(Set<TaskModel> tasks, LocalityManager localityManager);
}
public class ContainerModel {
- @Deprecated
- private final int containerId;
private final String processorId;
private final Map<TaskName, TaskModel> tasks;
+ // New field added denoting the physical hostname.
+ private final String hostName;
+ public interface LocalityManager {
// returns processorId to host mapping.
+ public Map<String, String> readProcessorLocality();
// writes the provided processordId to host mapping to underlying storage.
+ public boolean writeProcessorLocality(Map<String, String> processorLocality);
} |
Here are few reasons supporting the modification of TaskNameGrouper interface and removing LocalityManager from interface methods:
...