You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2020/02/22 03:50:49 UTC
[flink] 06/06: [FLINK-15912][table] Clean TableFactoryUtil
This is an automated email from the ASF dual-hosted git repository.
jark pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 052eb7722325cf1ef91ff5b898c30996e688eabe
Author: JingsongLi <lz...@aliyun.com>
AuthorDate: Wed Feb 12 17:48:52 2020 +0800
[FLINK-15912][table] Clean TableFactoryUtil
---
.../flink/table/factories/TableFactoryUtil.java | 29 ----------------------
1 file changed, 29 deletions(-)
diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java
index beca21d..336d694 100644
--- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java
+++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java
@@ -24,7 +24,6 @@ import org.apache.flink.table.catalog.CatalogTable;
import org.apache.flink.table.sinks.TableSink;
import org.apache.flink.table.sources.TableSource;
-import java.util.Map;
import java.util.Optional;
/**
@@ -61,34 +60,6 @@ public class TableFactoryUtil {
}
/**
- * Returns a table source matching the properties.
- */
- @SuppressWarnings("unchecked")
- private static <T> TableSource<T> findAndCreateTableSource(Map<String, String> properties) {
- try {
- return TableFactoryService
- .find(TableSourceFactory.class, properties)
- .createTableSource(properties);
- } catch (Throwable t) {
- throw new TableException("findAndCreateTableSource failed.", t);
- }
- }
-
- @SuppressWarnings("unchecked")
- private static <T> TableSink<T> findAndCreateTableSink(Map<String, String> properties) {
- TableSink tableSink;
- try {
- tableSink = TableFactoryService
- .find(TableSinkFactory.class, properties)
- .createTableSink(properties);
- } catch (Throwable t) {
- throw new TableException("findAndCreateTableSink failed.", t);
- }
-
- return tableSink;
- }
-
- /**
* Creates a table sink for a {@link CatalogTable} using table factory associated with the catalog.
*/
public static Optional<TableSink> createTableSinkForCatalogTable(Catalog catalog, TableSinkFactory.Context context) {