sanha commented on a change in pull request #1: [NEMO-26] Implement 
SourceLocationAwareSchedulingPolicy
URL: https://github.com/apache/incubator-nemo/pull/1#discussion_r172720045
 
 

 ##########
 File path: common/src/main/java/edu/snu/nemo/common/ir/Readable.java
 ##########
 @@ -28,5 +30,15 @@
    * @throws Exception exception while reading data.
    */
   Iterable<O> read() throws Exception;
+
+  /**
+   * Returns the list of locations where this readable resides.
+   * Each location has a complete copy of the readable.
+   * @return List of locations where this readable resides, or an empty list 
if this operation is not supported
+   * @throws Exception exceptions on the way
+   */
+  default List<String> getLocations() throws Exception {
 
 Review comment:
   Why do we have to define this default method?
   Can't we just add abstract method and well describe it's expected function?
   If this method is default, someone can omit to override the method while 
implementing another `Readable` even though it can support this function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to