vjagadish1989 commented on a change in pull request #905: SAMZA-2055: [WIP] 
Async high level api
URL: https://github.com/apache/samza/pull/905#discussion_r262766507
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/operators/impl/OperatorImpl.java
 ##########
 @@ -159,21 +162,19 @@ void registerInputStream(SystemStream input) {
         || taskModel.getSystemStreamPartitions().stream().anyMatch(ssp -> 
ssp.getSystemStream().equals(input));
   }
 
-  /**
-   * Handle the incoming {@code message} for this {@link OperatorImpl} and 
propagate results to registered operators.
-   * <p>
-   * Delegates to {@link #handleMessage(Object, MessageCollector, 
TaskCoordinator)} for handling the message.
-   *
-   * @param message  the input message
-   * @param collector  the {@link MessageCollector} for this message
-   * @param coordinator  the {@link TaskCoordinator} for this message
-   */
-  public final void onMessage(M message, MessageCollector collector, 
TaskCoordinator coordinator) {
+  @VisibleForTesting
+  final void onMessage(M message, MessageCollector collector, TaskCoordinator 
coordinator) {
+    onAsyncMessage(message, collector, coordinator)
+        .toCompletableFuture().join();
+  }
+
+  public final CompletionStage<Void> onAsyncMessage(M message, 
MessageCollector collector,
 
 Review comment:
   `onMessageAsync()`

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


With regards,
Apache Git Services

Reply via email to