tzulitai commented on a change in pull request #87: Document and Cleanup State 
Bootstrap API 
URL: https://github.com/apache/flink-statefun/pull/87#discussion_r401380362
 
 

 ##########
 File path: docs/deployment-and-operations/state-bootstrap.md
 ##########
 @@ -0,0 +1,137 @@
+---
+title: State Bootstrapping
+nav-id: bootstrapping
+nav-pos: 4
+nav-title: State Bootstrapping
+nav-parent_id: deployment-and-ops
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+Often times applications require some intial state provided by historical data 
in a file, database, or other system.
+Because state is managed by Apache Flink's snapshotting mechanism, writing the 
intial state into a 
[savepoint](https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/savepoints.html)
 that can be used to start the Job.
+Users can bootstrap initial state for Stateful Functions applications using 
Flink's [state processor 
api](https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/libs/state_processor_api.html)
 and a ``StatefulFunctionSavepointCreator``.
+
+To get started with the state processor api, include the following library in 
your application.
+
+{% highlight xml %}
+<dependency>
+  <groupId>org.apache.flink</groupId>
+  <artifactId>statefun-flink-state-processor</artifactId>
+  <version>{{ site.version }}</version>
+</dependency>
+<dependency>
+  <groupId>org.apache.flink</groupId>
+  <artifactId>flink-state-processor-api_{{ site.scala_version }}</artifactId>
+  <version>{{ site.flink_version }}</version>
+</dependency>
+{% endhighlight %}
+
+<div class="alert alert-info">
+  <strong>Attention:</strong> The savepoint creator currently only supports 
initializing the state for Java modules.
+</div>
+
+* This will be replaced by the TOC
+{:toc}
+
+## State Bootstrap Function
+
+A ``StateBootstrapFunction`` defines how to bootstrap state for a 
``StatefulFunction`` instance with a given input.
+
+Each bootstrap functions instance directly corresponds to a 
``StatefulFunction`` type.
+Likewise, each instance is uniquely identified by an address, represented by 
the type and id of the function being bootstrapped.
+Any state that is persisted by a bootstrap functions instance will be 
available to the corresponding live StatefulFunction instance having the same 
address.
 
 Review comment:
   ```suggestion
   Any state that is persisted by a bootstrap functions instance will be 
available to the corresponding live ``StatefulFunction`` instance having the 
same address.
   ```

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