sborya commented on a change in pull request #984: Samza 2116: Making sink,
sendTo(table), sendTo(stream) non-terminal
URL: https://github.com/apache/samza/pull/984#discussion_r271996528
##########
File path:
samza-core/src/main/java/org/apache/samza/operators/impl/SendToTableOperatorImpl.java
##########
@@ -54,11 +62,10 @@ protected void handleInit(Context context) {
}
@Override
- protected CompletionStage<Collection<Void>> handleMessageAsync(KV<K, V>
message, MessageCollector collector,
+ protected CompletionStage<Collection<KV<K, V>>> handleMessageAsync(KV<K, V>
message, MessageCollector collector,
TaskCoordinator coordinator) {
table.put(message.getKey(), message.getValue());
- // there should be no further chained operators since this is a terminal
operator.
- return CompletableFuture.completedFuture(Collections.emptyList());
+ return CompletableFuture.completedFuture(new ArrayList<KV<K,
V>>(Arrays.asList(message)));
Review comment:
is it sufficient to use ImmutableList
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services