You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/08 16:42:33 UTC

[GitHub] [flink] NicoK commented on a change in pull request #10502: [FLINK-14825][state-processor-api][docs] Rework state processor api documentation

NicoK commented on a change in pull request #10502: [FLINK-14825][state-processor-api][docs] Rework state processor api documentation
URL: https://github.com/apache/flink/pull/10502#discussion_r364330434
 
 

 ##########
 File path: docs/dev/libs/state_processor_api.md
 ##########
 @@ -413,45 +551,25 @@ The `KeyedStateBootstrapFunction` supports setting event time and processing tim
 The timers will not fire inside the bootstrap function and only become active once restored within a `DataStream` application.
 If a processing time timer is set but the state is not restored until after that time has passed, the timer will fire immediatly upon start.
 
-Once one or more transformations have been created they may be combined into a single `Savepoint`. 
-`Savepoint`'s are created using a state backend and max parallelism, they may contain any number of operators. 
+<span class="label label-danger">Attention</span> If your bootstrap function creates timers, the state can only be restored using one of the [process]({{ site.baseurl }}/dev/stream/operators/process_function.html) type functions.
+
+## Modifying Savepoints
 
-<div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
-{% highlight java %}
-Savepoint
-    .create(backend, 128)
-    .withOperator("uid1", transformation1)
-    .withOperator("uid2", transformation2)
-    .write(savepointPath);
-{% endhighlight %}
-</div>
-<div data-lang="scala" markdown="1">
-{% highlight scala %}
-Savepoint
-    .create(backend, 128)
-    .withOperator("uid1", transformation1)
-    .withOperator("uid2", transformation2)
-    .write(savepointPath)
-{% endhighlight %}
-</div>
-</div>
-		
 Besides creating a savepoint from scratch, you can base on off an existing savepoint such as when bootstrapping a single new operator for an existing job.
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 Savepoint
-    .load(backend, oldPath)
+    .load(new MemoryStateBackend(), oldPath)
     .withOperator("uid", transformation)
     .write(newPath);
 {% endhighlight %}
 </div>
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 Savepoint
-    .load(backend, oldPath)
+    .load(new MemoryStateBackend(), oldPath)
     .withOperator("uid", transformation)
     .write(newPath)
 {% endhighlight %}
 
 Review comment:
   Good catch, @qinjunjerry 
   
   @sjwiesman: what I meant is that you can always remove the new savepoint without affecting the old one because the old one is not touched, is it?

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


With regards,
Apache Git Services