You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2020/07/13 14:31:22 UTC
[flink] branch release-1.11 updated (f7cd463 -> 5a66b97)
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a change to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git.
from f7cd463 [FLINK-18324][docs-zh] Translate updated data type into Chinese
new c7509bb [hotfix][examples-table] Add missing format validation
new 5a66b97 [FLINK-18477][examples-table] Fix packaging of ChangelogSocketExample
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:
docs/dev/table/sourceSinks.md | 5 +++++
docs/dev/table/sourceSinks.zh.md | 5 +++++
flink-examples/flink-examples-table/pom.xml | 2 +-
.../table/examples/java/connectors/ChangelogCsvFormatFactory.java | 4 ++++
4 files changed, 15 insertions(+), 1 deletion(-)
[flink] 02/02: [FLINK-18477][examples-table] Fix packaging of
ChangelogSocketExample
Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 5a66b972a267c7fa177bf1a410f8262326f19fbb
Author: Timo Walther <tw...@apache.org>
AuthorDate: Mon Jul 13 14:00:02 2020 +0200
[FLINK-18477][examples-table] Fix packaging of ChangelogSocketExample
This closes #12884.
---
flink-examples/flink-examples-table/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-examples/flink-examples-table/pom.xml b/flink-examples/flink-examples-table/pom.xml
index cd4ebcf..f5e14d1 100644
--- a/flink-examples/flink-examples-table/pom.xml
+++ b/flink-examples/flink-examples-table/pom.xml
@@ -203,7 +203,7 @@ under the License.
</archive>
<includes>
- <include>org/apache/flink/table/examples/java/connectors/ChangelogSocketExample*</include>
+ <include>org/apache/flink/table/examples/java/connectors/*</include>
<include>**/META-INF/services/*</include>
</includes>
</configuration>
[flink] 01/02: [hotfix][examples-table] Add missing format
validation
Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
commit c7509bb244deecd45bb08cc7aa84534f5e5d4efd
Author: Timo Walther <tw...@apache.org>
AuthorDate: Mon Jul 13 13:27:21 2020 +0200
[hotfix][examples-table] Add missing format validation
---
docs/dev/table/sourceSinks.md | 5 +++++
docs/dev/table/sourceSinks.zh.md | 5 +++++
.../table/examples/java/connectors/ChangelogCsvFormatFactory.java | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/docs/dev/table/sourceSinks.md b/docs/dev/table/sourceSinks.md
index 0c735b2..e747c6f 100644
--- a/docs/dev/table/sourceSinks.md
+++ b/docs/dev/table/sourceSinks.md
@@ -398,6 +398,7 @@ import org.apache.flink.configuration.ConfigOptions;
import org.apache.flink.configuration.ReadableConfig;
import org.apache.flink.table.connector.format.DecodingFormat;
import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.factories.FactoryUtil;
import org.apache.flink.table.factories.DeserializationFormatFactory;
import org.apache.flink.table.factories.DynamicTableFactory;
@@ -429,6 +430,10 @@ public class ChangelogCsvFormatFactory implements DeserializationFormatFactory {
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(
DynamicTableFactory.Context context,
ReadableConfig formatOptions) {
+ // either implement your custom validation logic here ...
+ // or use the provided helper method
+ FactoryUtil.validateFactoryOptions(this, formatOptions);
+
// get the validated options
final String columnDelimiter = formatOptions.get(COLUMN_DELIMITER);
diff --git a/docs/dev/table/sourceSinks.zh.md b/docs/dev/table/sourceSinks.zh.md
index 43d84c9..27f7b8e 100644
--- a/docs/dev/table/sourceSinks.zh.md
+++ b/docs/dev/table/sourceSinks.zh.md
@@ -398,6 +398,7 @@ import org.apache.flink.configuration.ConfigOptions;
import org.apache.flink.configuration.ReadableConfig;
import org.apache.flink.table.connector.format.DecodingFormat;
import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.factories.FactoryUtil;
import org.apache.flink.table.factories.DeserializationFormatFactory;
import org.apache.flink.table.factories.DynamicTableFactory;
@@ -429,6 +430,10 @@ public class ChangelogCsvFormatFactory implements DeserializationFormatFactory {
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(
DynamicTableFactory.Context context,
ReadableConfig formatOptions) {
+ // either implement your custom validation logic here ...
+ // or use the provided helper method
+ FactoryUtil.validateFactoryOptions(this, formatOptions);
+
// get the validated options
final String columnDelimiter = formatOptions.get(COLUMN_DELIMITER);
diff --git a/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/connectors/ChangelogCsvFormatFactory.java b/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/connectors/ChangelogCsvFormatFactory.java
index a61836a..8a6c178 100644
--- a/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/connectors/ChangelogCsvFormatFactory.java
+++ b/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/connectors/ChangelogCsvFormatFactory.java
@@ -67,6 +67,10 @@ public final class ChangelogCsvFormatFactory implements DeserializationFormatFac
@Override
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(DynamicTableFactory.Context context, ReadableConfig formatOptions) {
+ // either implement your custom validation logic here ...
+ // or use the provided helper method
+ FactoryUtil.validateFactoryOptions(this, formatOptions);
+
// get the validated options
final String columnDelimiter = formatOptions.get(COLUMN_DELIMITER);