sjwiesman commented on a change in pull request #147:
URL: https://github.com/apache/flink-statefun/pull/147#discussion_r487120168



##########
File path: docs/sdk/java.md
##########
@@ -364,6 +364,43 @@ PersistedTable<String, Integer> table = 
PersistedTable.of("my-table", String.cla
 PersistedAppendingBuffer<Integer> buffer = 
PersistedAppendingBuffer.of("my-buffer", Integer.class);
 {% endhighlight %}
 
+### Dynamic State Registration
+
+Using the above state types, a function's persisted state must be defined 
eagerly. You cannot use those state types to
+register new persisted state during invocations (i.e. in the ``invoke`` 
method) or after the function instance is created.
+
+If dynamic state registration is required, you can use a 
``PersistedStateRegistry`` to achieve that:

Review comment:
       I can't exactly explain why, but the way you wrote it sounds off to me. 
   ```suggestion
   If dynamic state registration is required, it can be achieved using a 
``PersistedStateRegistry``:
   ```

##########
File path: docs/sdk/java.md
##########
@@ -364,6 +364,43 @@ PersistedTable<String, Integer> table = 
PersistedTable.of("my-table", String.cla
 PersistedAppendingBuffer<Integer> buffer = 
PersistedAppendingBuffer.of("my-buffer", Integer.class);
 {% endhighlight %}
 
+### Dynamic State Registration
+
+Using the above state types, a function's persisted state must be defined 
eagerly. You cannot use those state types to
+register new persisted state during invocations (i.e. in the ``invoke`` 
method) or after the function instance is created.

Review comment:
       ```suggestion
   register a new persisted state during invocations (i.e., in the ``invoke`` 
method) or after the function instance is created.
   ```

##########
File path: docs/sdk/java.md
##########
@@ -364,6 +364,43 @@ PersistedTable<String, Integer> table = 
PersistedTable.of("my-table", String.cla
 PersistedAppendingBuffer<Integer> buffer = 
PersistedAppendingBuffer.of("my-buffer", Integer.class);
 {% endhighlight %}
 
+### Dynamic State Registration
+
+Using the above state types, a function's persisted state must be defined 
eagerly. You cannot use those state types to
+register new persisted state during invocations (i.e. in the ``invoke`` 
method) or after the function instance is created.
+
+If dynamic state registration is required, you can use a 
``PersistedStateRegistry`` to achieve that:

Review comment:
       I can't exactly explain why, but the way you wrote it sounds off to me. 
   ```suggestion
   If dynamic state registration is required, it can be achieved using a 
``PersistedStateRegistry``:
   ```

##########
File path: docs/sdk/java.md
##########
@@ -364,6 +364,43 @@ PersistedTable<String, Integer> table = 
PersistedTable.of("my-table", String.cla
 PersistedAppendingBuffer<Integer> buffer = 
PersistedAppendingBuffer.of("my-buffer", Integer.class);
 {% endhighlight %}
 
+### Dynamic State Registration
+
+Using the above state types, a function's persisted state must be defined 
eagerly. You cannot use those state types to
+register new persisted state during invocations (i.e. in the ``invoke`` 
method) or after the function instance is created.

Review comment:
       ```suggestion
   register a new persisted state during invocations (i.e., in the ``invoke`` 
method) or after the function instance is created.
   ```




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


Reply via email to