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/04/06 04:03:40 UTC

[flink-statefun] branch release-2.0 updated (02dba2f -> f1d4e0c)

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

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


    from 02dba2f  [FLINK-16932][legal] Remove unnecessary entries in the distribution jar NOTICE
     new add08dd  [FLINK-16948][docs] Change docs to better highlight embedded vs remote module configurations
     new f1d4e0c  [FLINK-16950] Add --isolation-level read_committed

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                          |  4 +-
 docs/getting-started/java_walkthrough.md           |  8 ++--
 docs/io-module/apache-kafka.md                     | 40 ++++++++++----------
 docs/io-module/aws-kinesis.md                      | 44 +++++++++++-----------
 docs/io-module/index.md                            | 12 +++---
 .../statefun-greeter-example/README.md             |  4 +-
 6 files changed, 59 insertions(+), 53 deletions(-)


[flink-statefun] 01/02: [FLINK-16948][docs] Change docs to better highlight embedded vs remote module configurations

Posted by tz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit add08dd49ff4bc0d0bde15667a8178c82824127b
Author: Seth Wiesman <sj...@gmail.com>
AuthorDate: Thu Apr 2 11:57:15 2020 -0500

    [FLINK-16948][docs] Change docs to better highlight embedded vs remote module configurations
    
    This closes #93.
---
 docs/io-module/apache-kafka.md | 40 +++++++++++++++++++-------------------
 docs/io-module/aws-kinesis.md  | 44 +++++++++++++++++++++---------------------
 docs/io-module/index.md        | 12 ++++++------
 3 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/docs/io-module/apache-kafka.md b/docs/io-module/apache-kafka.md
index 762fd27..91146cc 100644
--- a/docs/io-module/apache-kafka.md
+++ b/docs/io-module/apache-kafka.md
@@ -59,7 +59,7 @@ It accepts the following arguments:
 6. The position to start consuming from
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.kafka;
 
@@ -85,7 +85,7 @@ public class IngressSpecs {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 
@@ -126,12 +126,12 @@ The ingress allows configuring the startup position to be one of the following:
 Starts from offsets that were committed to Kafka for the specified consumer group.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaIngressStartupPosition#fromGroupOffsets();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: group-offsets
@@ -144,12 +144,12 @@ startupPosition:
 Starts from the earliest offset.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaIngressStartupPosition#fromEarliest();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: earliest
@@ -162,12 +162,12 @@ startupPosition:
 Starts from the latest offset.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaIngressStartupPosition#fromLatest();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: latest
@@ -180,7 +180,7 @@ startupPosition:
 Starts from specific offsets, defined as a map of partitions to their target starting offset.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 Map<TopicPartition, Long> offsets = new HashMap<>();
 offsets.add(new TopicPartition("user-topic", 0), 91);
@@ -190,7 +190,7 @@ offsets.add(new TopicPartition("user-topic", 8), 8);
 KafkaIngressStartupPosition#fromSpecificOffsets(offsets);
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: specific-offsets
@@ -207,12 +207,12 @@ startupPosition:
 Starts from offsets that have an ingestion time larger than or equal to a specified date.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaIngressStartupPosition#fromDate(ZonedDateTime.now());
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: date
@@ -272,7 +272,7 @@ It accepts the following arguments:
 5. Properties for the Kafka producer
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.kafka;
 
@@ -294,7 +294,7 @@ public class EgressSpecs {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 
@@ -330,12 +330,12 @@ You can choose three different modes of operation.
 Nothing is guaranteed, produced records can be lost or duplicated.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaEgressBuilder#withNoProducerSemantics();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 deliverySemantic:
     type: none
@@ -348,12 +348,12 @@ deliverySemantic:
 Stateful Functions will guarantee that no records will be lost but they can be duplicated.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaEgressBuilder#withAtLeastOnceProducerSemantics();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 deliverySemantic:
     type: at-least-once
@@ -366,12 +366,12 @@ deliverySemantic:
 Stateful Functions uses Kafka transactions to provide exactly-once semantics.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KafkaEgressBuilder#withExactlyOnceProducerSemantics(Duration.minutes(15));
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 deliverySemantic:
     type: exactly-once
diff --git a/docs/io-module/aws-kinesis.md b/docs/io-module/aws-kinesis.md
index 65e7d51..1975004 100644
--- a/docs/io-module/aws-kinesis.md
+++ b/docs/io-module/aws-kinesis.md
@@ -59,7 +59,7 @@ It accepts the following arguments:
 6. The name of the stream to consume from
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.kinesis;
 
@@ -87,7 +87,7 @@ public class IngressSpecs {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 
@@ -140,12 +140,12 @@ The ingress allows configuring the startup position to be one of the following:
 Start consuming from the latest position, i.e. head of the stream shards.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KinesisIngressStartupPosition#fromLatest();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: latest
@@ -158,12 +158,12 @@ startupPosition:
 Start consuming from the earliest position possible.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KinesisIngressStartupPosition#fromEarliest();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: earliest
@@ -176,12 +176,12 @@ startupPosition:
 Starts from offsets that have an ingestion time larger than or equal to a specified date.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 KinesisIngressStartupPosition#fromDate(ZonedDateTime.now());
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 startupPosition:
     type: date
@@ -239,7 +239,7 @@ It accepts the following arguments:
 6. The number of max outstanding records before backpressure is applied
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.kinesis;
 
@@ -265,7 +265,7 @@ public class EgressSpecs {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 
@@ -347,12 +347,12 @@ Both the Kinesis ingress and egress can be configured to a specific AWS region.
 Consults AWS's default provider chain to determine the AWS region.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsRegion.fromDefaultProviderChain();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: default
@@ -365,12 +365,12 @@ awsCredentials:
 Specifies an AWS region using the region's unique id.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsRegion.of("us-west-1");
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: specific
@@ -386,12 +386,12 @@ Connects to an AWS region through a non-standard AWS service endpoint.
 This is typically used only for development and testing purposes.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsRegion.ofCustomEndpoint("https://localhost:4567", "us-west-1");
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: custom-endpoint
@@ -410,12 +410,12 @@ Both the Kinesis ingress and egress can be configured using standard AWS credent
 Consults AWS’s default provider chain to determine the AWS credentials.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsCredentials.fromDefaultProviderChain();
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: default
@@ -428,12 +428,12 @@ awsCredentials:
 Specifies the AWS credentials directly with provided access key ID and secret access key strings.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsCredentials.basic("accessKeyId", "secretAccessKey");
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: basic
@@ -448,12 +448,12 @@ awsCredentials:
 Specifies the AWS credentials using an AWS configuration profile, along with the profile's configuration path.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 AwsCredentials.profile("profile-name", "/path/to/profile/config");
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 awsCredentials:
     type: basic
diff --git a/docs/io-module/index.md b/docs/io-module/index.md
index 3ae0905..34909fc 100644
--- a/docs/io-module/index.md
+++ b/docs/io-module/index.md
@@ -42,7 +42,7 @@ An ingress identifier, similar to a function type, uniquely identifies an ingres
 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.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.ingress;
 
@@ -79,7 +79,7 @@ public class ModuleWithIngress implements StatefulFunctionModule {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 
@@ -103,7 +103,7 @@ A router is a stateless operator that takes each record from an ingress and rout
 Routers are bound to the system via a stateful function module, and unlike other components, an ingress may have any number of routers.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.ingress;
 
@@ -146,7 +146,7 @@ public class ModuleWithRouter implements StatefulFunctionModule {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 When defined in ``yaml``, routers are defined by a list of function types.
 The ``id`` component of the address is pulled from the key associated with each record in its underlying source implementation.
 {% highlight yaml %}
@@ -167,7 +167,7 @@ An egress spec defines the details of how to connect to the external system, the
 Each identifier-spec pair are bound to the system inside a stateful function module.
 
 <div class="codetabs" markdown="1">
-<div data-lang="java" markdown="1">
+<div data-lang="Embedded Module" markdown="1">
 {% highlight java %}
 package org.apache.flink.statefun.docs.io.egress;
 
@@ -205,7 +205,7 @@ public class ModuleWithEgress implements StatefulFunctionModule {
 }
 {% endhighlight %}
 </div>
-<div data-lang="yaml" markdown="1">
+<div data-lang="Remote Module" markdown="1">
 {% highlight yaml %}
 version: "1.0"
 


[flink-statefun] 02/02: [FLINK-16950] Add --isolation-level read_committed

Posted by tz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f1d4e0c1afc9063b83775c7d85b1a2a8765c5991
Author: Igal Shilman <ig...@gmail.com>
AuthorDate: Thu Apr 2 21:16:29 2020 +0200

    [FLINK-16950] Add --isolation-level read_committed
    
    Kafka console consumer, by default, displays uncommitted records
    This might confuse users that try out our examples.
    
    This closes #94.
---
 README.md                                            | 4 +++-
 docs/getting-started/java_walkthrough.md             | 8 +++++---
 statefun-examples/statefun-greeter-example/README.md | 4 +++-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index a38bc80..edc6de9 100755
--- a/README.md
+++ b/README.md
@@ -147,7 +147,9 @@ docker-compose exec kafka-broker kafka-console-producer.sh \
 ```
 docker-compose exec kafka-broker kafka-console-consumer.sh \
      --bootstrap-server localhost:9092 \
-     --topic greetings --from-beginning
+     --isolation-level read_committed \
+     --from-beginning \
+     --topic greetings 
 ```
 
 ### <a name="project-setup"></a>Project setup
diff --git a/docs/getting-started/java_walkthrough.md b/docs/getting-started/java_walkthrough.md
index d7b4a49..cec130a 100644
--- a/docs/getting-started/java_walkthrough.md
+++ b/docs/getting-started/java_walkthrough.md
@@ -185,9 +185,11 @@ $ docker-compose exec kafka-broker kafka-console-producer.sh \
     --broker-list localhost:9092 \
     --topic names
 
-$ docker-compose exec kafka-broker kafka-console-consumer.sh \
-    --bootstrap-server localhost:9092 \
-    --topic greetings
+docker-compose exec kafka-broker kafka-console-consumer.sh \
+     --bootstrap-server localhost:9092 \
+     --isolation-level read_committed \
+     --from-beginning \
+     --topic greetings
 {% endhighlight %}
 
 <p class="text-center">
diff --git a/statefun-examples/statefun-greeter-example/README.md b/statefun-examples/statefun-greeter-example/README.md
index ce5c132..dc1edb0 100644
--- a/statefun-examples/statefun-greeter-example/README.md
+++ b/statefun-examples/statefun-greeter-example/README.md
@@ -26,5 +26,7 @@ docker-compose exec kafka-broker kafka-console-producer.sh \
 ```
 docker-compose exec kafka-broker kafka-console-consumer.sh \
      --bootstrap-server localhost:9092 \
-     --topic greetings --from-beginning
+     --isolation-level read_committed \
+     --from-beginning \
+     --topic greetings
 ```