You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/04/30 17:34:58 UTC

[GitHub] [samza] cameronlee314 commented on a change in pull request #1016: SAMZA-2179: Move the StartpointVisitor abstraction to SystemAdmin interface.

cameronlee314 commented on a change in pull request #1016: SAMZA-2179: Move the StartpointVisitor abstraction to SystemAdmin interface.
URL: https://github.com/apache/samza/pull/1016#discussion_r279843610
 
 

 ##########
 File path: samza-api/src/main/java/org/apache/samza/startpoint/Startpoint.java
 ##########
 @@ -50,12 +50,13 @@ public long getCreationTimestamp() {
   }
 
   /**
-   * Apply the visitor {@link StartpointVisitor}'s register methods to the instance of this {@link Startpoint}
-   * class.
-   * @param systemStreamPartition The {@link SystemStreamPartition} needed to register with the {@link StartpointVisitor}
-   * @param startpointVisitor The visitor to register with.
+   * Applies the {@link StartpointVisitor}'s visit methods to the {@link Startpoint}
+   * and resolves it to a system specific offset.
+   * @param systemStreamPartition the {@link SystemStreamPartition} of the startpoint.
+   * @param startpointVisitor the visitor of the startpoint.
+   * @return the resolved offset.
    */
-  public abstract void apply(SystemStreamPartition systemStreamPartition, StartpointVisitor startpointVisitor);
+  public abstract String apply(SystemStreamPartition systemStreamPartition, StartpointVisitor startpointVisitor);
 
 Review comment:
   To further generify the API, you could replace `SystemStreamPartition` with a type param and `String` with a type param, then generify `StartpointVisitor` with 2 type params.
   e.g.:
   `public abstract OUT apply(IN input, StartpointVisitor<IN, OUT> startpointVisitor)`
   
   If you enforce String to be returned, that restricts what callers can do. By leaving it generic, callers can choose.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services