THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
// '+' denotes addition, '-' denotes deletion. public interface TaskNameGrouper { + @deprecated@Deprecated Set<ContainerModel> group(Set<TaskModel> tasks); + @deprecated@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); } + @Deprecated public interface BalancingTaskNameGrouper extends TaskNameGrouper { + @deprecated@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 locationId. + private final String locationId; } +public interface LocationIdProvider { LocationId getLocationId(); } + public class LocalityInfo { + // In case of containerized environments, LocationId is a combination of multiple fields (sliceId, containerId, hostname) instead of simple physical hostname, + // Using a class to represent that, rather than a primitive string. This will be provided by execution environment. + private Map<String, LocationId> taskLocality; + public Map<String, LocationId> getLocality(); } + public interface LocalityManager { // returns processorId to host mapping. + public LocalityInfo readProcessorLocality(); // writes the provided processordId to host mapping to underlying storage. + public boolean writeProcessorLocality(LocalityInfo localityInfo); } |
...