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/05/07 00:25:27 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_r281423849
 
 

 ##########
 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:
   One of the core concepts of the visitor pattern is to make the visitor generic. The caller is always going to use a specific implementation of the visitor, so they do need to know which one they are using.

----------------------------------------------------------------
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