You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/09/08 17:11:20 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #15473: [BEAM-12588] Multimap user state proto changes

lukecwik commented on a change in pull request #15473:
URL: https://github.com/apache/beam/pull/15473#discussion_r704613115



##########
File path: model/fn-execution/src/main/proto/beam_fn_api.proto
##########
@@ -721,14 +730,62 @@ message StateKey {
     bytes key = 4;
   }
 
+  // Represents a request for the keys of a multimap associated with a specified
+  // user key and window for a PTransform. See
+  // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
+  // details.
+  //
+  // Can only be used to perform StateGetRequests and StateClearRequests on the
+  // user state.
+  //
+  // The response data stream will be a concatenation of all K's associated
+  // with the specified user key and window.
+  // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
+  // details.
+  message MultimapKeysUserState {
+    // (Required) The id of the PTransform containing user state.
+    string transform_id = 1;
+    // (Required) The id of the user state.
+    string user_state_id = 2;
+    // (Required) The window encoded in a nested context.
+    bytes window = 3;
+    // (Required) The key of the currently executing element encoded in a
+    // nested context.
+    bytes key = 4;
+  }
+
+  // Represents a request for the values of the lookup key associated with a
+  // specified user key and window for a PTransform. See
+  // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
+  // details.
+  //
+  // The response data stream will be a concatenation of all V's associated
+  // with the specified user key, map key and window.
+  // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
+  // details.

Review comment:
       ```suggestion
     // Represents a request for the values of the map key associated with a
     // specified user key and window for a PTransform. See
     // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
     // details.
     //
     // The response data stream will be a concatenation of all V's associated
     // with the specified map key, user key, and window.
     // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
     // details.
   ```
   
   Ordering the `keys` so both statements are easier to read.

##########
File path: model/fn-execution/src/main/proto/beam_fn_api.proto
##########
@@ -721,14 +730,62 @@ message StateKey {
     bytes key = 4;
   }
 
+  // Represents a request for the keys of a multimap associated with a specified
+  // user key and window for a PTransform. See
+  // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
+  // details.
+  //
+  // Can only be used to perform StateGetRequests and StateClearRequests on the
+  // user state.
+  //
+  // The response data stream will be a concatenation of all K's associated
+  // with the specified user key and window.
+  // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
+  // details.
+  message MultimapKeysUserState {
+    // (Required) The id of the PTransform containing user state.
+    string transform_id = 1;
+    // (Required) The id of the user state.
+    string user_state_id = 2;
+    // (Required) The window encoded in a nested context.
+    bytes window = 3;
+    // (Required) The key of the currently executing element encoded in a
+    // nested context.
+    bytes key = 4;
+  }
+
+  // Represents a request for the values of the lookup key associated with a
+  // specified user key and window for a PTransform. See
+  // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
+  // details.
+  //
+  // The response data stream will be a concatenation of all V's associated
+  // with the specified user key, map key and window.
+  // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
+  // details.
+  message MultimapUserState {
+    // (Required) The id of the PTransform containing user state.
+    string transform_id = 1;
+    // (Required) The id of the user state.
+    string user_state_id = 2;
+    // (Required) The window encoded in a nested context.
+    bytes window = 3;
+    // (Required) The key of the currently executing element encoded in a
+    // nested context.
+    bytes key = 4;
+    // (Required) The encoded lookup key for the map encoded in a nested context.

Review comment:
       ```suggestion
       // (Required) The map key encoded in a nested context.
   ```




-- 
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: github-unsubscribe@beam.apache.org

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