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_r364338514
 
 

 ##########
 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:
   ok, let's stay cautious here - it depends how you delete the new savepoint:
   - deleting it from the filesystem manually would be safe
   - deleting it via `./bin/flink savepoint -d <savepointPath>` is not (this 
would then also delete the operator state referenced in the new savepoint 
(metadata) which lives in the old one)

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

Reply via email to