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/12/02 19:12:39 UTC

[GitHub] [samza] mynameborat commented on a change in pull request #1560: SAMZA-2709: Adding partial update api to Table API

mynameborat commented on a change in pull request #1560:
URL: https://github.com/apache/samza/pull/1560#discussion_r761388896



##########
File path: samza-api/src/main/java/org/apache/samza/table/AsyncReadWriteTable.java
##########
@@ -90,6 +91,27 @@
    */
   CompletableFuture<Void> putAllAsync(List<Entry<K, V>> entries, Object ... args);
 
+  /**
+   * Asynchronously updates an existing record for a given key with the specified update.
+   *
+   * @param key the key with which the specified {@code value} is to be associated.
+   * @param update the update applied to the record associated with a given {@code key}.
+   * @param args additional arguments
+   * @throws NullPointerException if the specified {@code key} is {@code null}.
+   * @return CompletableFuture for the operation
+   */
+  CompletableFuture<Void> updateAsync(K key, U update, Object ... args);
+
+  /**
+   * Asynchronously updates the existing records for the given keys with their corresponding updates.
+   *
+   * @param updates the key and update mappings.
+   * @param args additional arguments
+   * @throws NullPointerException if any of the specified {@code entries} has {@code null} as key.
+   * @return CompletableFuture for the operation
+   */
+  CompletableFuture<Void> updateAllAsync(List<Entry<K, U>> updates, Object ... args);

Review comment:
       Can you change the return type to CompletionStage instead of future?
   we don't want to accidentally promote folks to fallback to synchronous programming by using .get() or join on this. Please apply the same comment for all the interfaces.




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

To unsubscribe, e-mail: commits-unsubscribe@samza.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org