You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/03/12 02:45:49 UTC

[flink-statefun] 04/08: [FLINK-16515][docs] Move IO Modules to Top Level

This is an automated email from the ASF dual-hosted git repository.

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit ce37ceac95b76aa036471d3236d17184ada9ea6c
Author: Seth Wiesman <sj...@gmail.com>
AuthorDate: Wed Mar 4 18:22:48 2020 -0600

    [FLINK-16515][docs] Move IO Modules to Top Level
---
 statefun-docs/docs/getting_started/index.rst               |  2 +-
 statefun-docs/docs/index.rst                               |  4 ++--
 statefun-docs/docs/{api_concepts => }/io_module/custom.rst | 12 ++++++------
 statefun-docs/docs/{api_concepts => }/io_module/index.rst  | 14 +++++++-------
 statefun-docs/docs/{api_concepts => }/io_module/kafka.rst  |  8 ++++----
 .../docs/{api_concepts => }/io_module/source_sink.rst      |  4 ++--
 statefun-docs/docs/{api_concepts => sdk}/index.rst         |  9 ++++-----
 .../docs/{api_concepts => sdk}/match_functions.rst         |  0
 statefun-docs/docs/{api_concepts => sdk}/persistence.rst   |  0
 .../docs/{api_concepts => sdk}/stateful_functions.rst      |  0
 10 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/statefun-docs/docs/getting_started/index.rst b/statefun-docs/docs/getting_started/index.rst
index 1ccb68b..2e04f29 100644
--- a/statefun-docs/docs/getting_started/index.rst
+++ b/statefun-docs/docs/getting_started/index.rst
@@ -40,7 +40,7 @@ It provides a step by step introduction to the API and guides you through real a
 Learn Concepts Step By Step
 ===========================
 
-If you prefer to learn concepts step by step, start with our guide to :ref:`main concepts <api-concepts>`.
+If you prefer to learn concepts step by step, start with our guide to :ref:`main concepts <concepts>`.
 It will walk you through all the API's and concepts to build advanced stateful systems.
 
 
diff --git a/statefun-docs/docs/index.rst b/statefun-docs/docs/index.rst
index 28a30f0..c235e9c 100644
--- a/statefun-docs/docs/index.rst
+++ b/statefun-docs/docs/index.rst
@@ -16,10 +16,10 @@
 .. toctree::
    :hidden:
 
-   overview/index
    getting_started/index
    concepts/index
-   api_concepts/index
+   sdk/index
+   io_module/index
    deployment_operations/index
 
 ###########################################
diff --git a/statefun-docs/docs/api_concepts/io_module/custom.rst b/statefun-docs/docs/io_module/custom.rst
similarity index 85%
rename from statefun-docs/docs/api_concepts/io_module/custom.rst
rename to statefun-docs/docs/io_module/custom.rst
index 9dc44ea..a24a5f5 100644
--- a/statefun-docs/docs/api_concepts/io_module/custom.rst
+++ b/statefun-docs/docs/io_module/custom.rst
@@ -41,11 +41,11 @@ Ingress and egress types are similar to function types, they provide an namespac
 Specs are what users configure to set properties for a particular instance of an I/O connection.
 The only required parameter is the ingress or egress identifier, all other properties will by system specific.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/custom/MyIngressSpec.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/custom/MyIngressSpec.java
     :language: java
     :lines: 18-
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/custom/MyEgressSpec.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/custom/MyEgressSpec.java
     :language: java
     :lines: 18-
 
@@ -60,11 +60,11 @@ Source and Sink Providers
 
 Providers take in the ingress and egress specs and return configured Flink sources and sinks.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MySourceProvider.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MySourceProvider.java
     :language: java
     :lines: 18-
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MySinkProvider.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MySinkProvider.java
     :language: java
     :lines: 18-
 
@@ -75,7 +75,7 @@ Flink I/O modules are Stateful Functions' top level entry point for accessing Fl
 They define the relationship between ingress and egress types and source and sink providers.
 It also provides runtime configurations through the ``globalConfguration`` which is the union of all configurations in the applications ``flink-conf.yaml`` and any command line arguments passed in the form ``--key value``.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MyFlinkIoModule.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/custom/flink/MyFlinkIoModule.java
     :language: java
     :lines: 18-
 
@@ -84,4 +84,4 @@ This means that every JAR should contain a file ``org.apache.flink.statefun.flin
 
 .. code-block:: yaml
 
-    org.apache.flink.statefun.docs.impl.io.MyFlinkIoModule
\ No newline at end of file
+    org.apache.flink.statefun.docs.impl.io.MyFlinkIoModule
diff --git a/statefun-docs/docs/api_concepts/io_module/index.rst b/statefun-docs/docs/io_module/index.rst
similarity index 82%
rename from statefun-docs/docs/api_concepts/io_module/index.rst
rename to statefun-docs/docs/io_module/index.rst
index 454370f..e9df63e 100644
--- a/statefun-docs/docs/api_concepts/io_module/index.rst
+++ b/statefun-docs/docs/io_module/index.rst
@@ -39,14 +39,14 @@ An ``IngressIdentifier`` and an ``IngressSpec`` define it.
 
 An ingress identifier, similar to a function type, uniquely identifies an ingress by specifying its input type, a namespace, and a name.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/ingress/Identifiers.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/ingress/Identifiers.java
     :language: java
     :lines: 18-
 
 The spec defines the details of how to connect to the external system, which is specific to each individual I/O module.
 Each identifier-spec pair is bound to the system inside an stateful function module.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/ingress/ModuleWithIngress.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/ingress/ModuleWithIngress.java
     :language: java
     :lines: 18-
 
@@ -55,14 +55,14 @@ Router
 
 A router is a stateless operator that takes each record from an ingress and routes it to zero or more functions.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/ingress/UserRouter.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/ingress/UserRouter.java
     :language: java
     :lines: 18-
 
 Routers are bound to the system via a stateful function module.
 Unlike other components, an ingress may have any number of routers.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/ingress/ModuleWithRouter.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/ingress/ModuleWithRouter.java
     :language: java
     :lines: 18-
 
@@ -76,20 +76,20 @@ Each egress is defined using two components, an ``EgressIdentifier`` and an ``Eg
 
 An egress identifier uniquely identifies an egress based on a namespace, name, and producing type.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/egress/Identifiers.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/egress/Identifiers.java
     :language: java
     :lines: 18-
 
 An egress spec defines the details of how to connect to the external system, the details are specific to each individual I/O module.
 Each identifier-spec pair are bound to the system inside a stateful function module.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/egress/ModuleWithEgress.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/egress/ModuleWithEgress.java
     :language: java
     :lines: 18-
 
 Stateful functions may then message an egress the same way they message another function, passing the egress identifier as function type.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/egress/FnOutputting.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/egress/FnOutputting.java
     :language: java
     :lines: 18-
 
diff --git a/statefun-docs/docs/api_concepts/io_module/kafka.rst b/statefun-docs/docs/io_module/kafka.rst
similarity index 93%
rename from statefun-docs/docs/api_concepts/io_module/kafka.rst
rename to statefun-docs/docs/io_module/kafka.rst
index c3061df..1f4639d 100644
--- a/statefun-docs/docs/api_concepts/io_module/kafka.rst
+++ b/statefun-docs/docs/io_module/kafka.rst
@@ -50,7 +50,7 @@ It accepts the following arguments:
 5) A ``KafkaIngressDeserializer`` for deserializing data from Kafka
 6) The position to start consuming from
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/kafka/IngressSpecs.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/kafka/IngressSpecs.java
     :language: java
     :lines: 18-
 
@@ -77,7 +77,7 @@ The Kafka ingress needs to know how to turn the binary data in Kafka into Java o
 The ``KafkaIngressDeserializer`` allows users to specify such a schema.
 The ``T deserialize(ConsumerRecord<byte[], byte[]> record)`` method gets called for each Kafka message, passing the key, value, and metadata from Kafka.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/kafka/UserDeserializer.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/kafka/UserDeserializer.java
     :language: java
     :lines: 18-
 
@@ -94,7 +94,7 @@ It accepts the following arguments:
 4) The fault tolerance semantic
 5) Properties for the Kafka producer
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/kafka/EgressSpecs.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/kafka/EgressSpecs.java
     :language: java
     :lines: 18-
 
@@ -117,6 +117,6 @@ The Kafka egress needs to know how to turn Java objects into binary data.
 The ``KafkaEgressSerializer`` allows users to specify such a schema.
 The ``ProducerRecord<byte[], byte[]> serialize(T out)`` method gets called for each message, allowing users to set a key, value, and other metadata.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/kafka/UserSerializer.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/kafka/UserSerializer.java
     :language: java
     :lines: 18-
diff --git a/statefun-docs/docs/api_concepts/io_module/source_sink.rst b/statefun-docs/docs/io_module/source_sink.rst
similarity index 88%
rename from statefun-docs/docs/api_concepts/io_module/source_sink.rst
rename to statefun-docs/docs/io_module/source_sink.rst
index 6fc963d..f64c03e 100644
--- a/statefun-docs/docs/api_concepts/io_module/source_sink.rst
+++ b/statefun-docs/docs/io_module/source_sink.rst
@@ -39,7 +39,7 @@ Source Spec
 
 A source function spec creates an ingress from a Flink source function.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/flink/ModuleWithSourceSpec.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/flink/ModuleWithSourceSpec.java
     :language: java
     :lines: 18-
 
@@ -48,6 +48,6 @@ Sink Spec
 
 A sink function spec creates an egress from a Flink sink function.
 
-.. literalinclude:: ../../../src/main/java/org/apache/flink/statefun/docs/io/flink/ModuleWithSinkSpec.java
+.. literalinclude:: ../../src/main/java/org/apache/flink/statefun/docs/io/flink/ModuleWithSinkSpec.java
     :language: java
     :lines: 18-
diff --git a/statefun-docs/docs/api_concepts/index.rst b/statefun-docs/docs/sdk/index.rst
similarity index 94%
rename from statefun-docs/docs/api_concepts/index.rst
rename to statefun-docs/docs/sdk/index.rst
index e14373f..3b18316 100644
--- a/statefun-docs/docs/api_concepts/index.rst
+++ b/statefun-docs/docs/sdk/index.rst
@@ -13,11 +13,11 @@
    specific language governing permissions and limitations
    under the License.
 
-.. _api-concepts:
+.. _sdk:
 
-############
-API Concepts
-############
+###
+SDK
+###
 
 .. toctree::
   :hidden:
@@ -25,7 +25,6 @@ API Concepts
   stateful_functions
   match_functions
   persistence
-  io_module/index
 
 Stateful Functions applications are a collection of virtual stateful functions that can send arbitrary messages between each other and external systems.
 The execution can happen on a local JVM, or clusters of many machines.
diff --git a/statefun-docs/docs/api_concepts/match_functions.rst b/statefun-docs/docs/sdk/match_functions.rst
similarity index 100%
rename from statefun-docs/docs/api_concepts/match_functions.rst
rename to statefun-docs/docs/sdk/match_functions.rst
diff --git a/statefun-docs/docs/api_concepts/persistence.rst b/statefun-docs/docs/sdk/persistence.rst
similarity index 100%
rename from statefun-docs/docs/api_concepts/persistence.rst
rename to statefun-docs/docs/sdk/persistence.rst
diff --git a/statefun-docs/docs/api_concepts/stateful_functions.rst b/statefun-docs/docs/sdk/stateful_functions.rst
similarity index 100%
rename from statefun-docs/docs/api_concepts/stateful_functions.rst
rename to statefun-docs/docs/sdk/stateful_functions.rst