Sanil15 commented on a change in pull request #1421:
URL: https://github.com/apache/samza/pull/1421#discussion_r477612586
##########
File path:
samza-core/src/main/java/org/apache/samza/container/LocalityManager.java
##########
@@ -53,28 +56,26 @@ public LocalityManager(MetadataStore metadataStore) {
}
/**
- * Method to allow read container locality information from the {@link
MetadataStore}.
- * This method is used in {@link
org.apache.samza.coordinator.JobModelManager}.
+ * Fetch the container locality information from the {@link MetadataStore}.
*
- * @return the map of containerId: (hostname)
+ * @return the {@code LocalityModel} for the job
*/
- public Map<String, Map<String, String>> readContainerLocality() {
Review comment:
```
Optional.ofNullable(localityManager.readLocality().getProcessorLocality(processorId))
.map(ProcessorLocality::host)
.orElse(null);
```
is redundant and I was refeering to make a helper method that returns this
so if tomorrow there is a third place where we need last seen host we would not
repeat the same thing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]