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 2021/02/16 18:03:24 UTC

[GitHub] [samza] kw2542 commented on a change in pull request #1463: SAMZA-2621: Support custom operator name in MessageStream

kw2542 commented on a change in pull request #1463:
URL: https://github.com/apache/samza/pull/1463#discussion_r577028220



##########
File path: samza-api/src/main/java/org/apache/samza/operators/MessageStream.java
##########
@@ -130,11 +183,19 @@
    * Note: The message will be written but not flushed to the underlying output system before its propagated to the
    * chained operators. Messages retain the original partitioning scheme when propogated to next operator.
    *
+   * @param desc description of this send to operation
    * @param outputStream the output stream to send messages to
    * @return this {@link MessageStream}
    */
-  MessageStream<M> sendTo(OutputStream<M> outputStream);
+  MessageStream<M> sendTo(String desc, OutputStream<M> outputStream);
 
+  /**
+   * Equivalent to {@code window("", window, id)}
+   * @see #window(String, Window, String)
+   */
+  default <K, WV> MessageStream<WindowPane<K, WV>> window(Window<M, K, WV> window, String id) {

Review comment:
       Good question! The reason why I added to window, join and partition by is because, one major use case of high level API in Samza is to support Beam API, where the existing `id` are auto-generated for users. i.e. it does not help a lot when users tries to associate their transforms with operator id, therefore, a customized name would greatly help.




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