├── src
└── main
│ ├── resources
│ ├── kafka.properties
│ ├── database.properties
│ ├── logback.xml
│ └── log4j.properties
│ └── java
│ └── com
│ ├── sinks
│ ├── SinkToHbase.java
│ ├── SinkToKafka.java
│ ├── SinkToGreenplum.java
│ └── SinkToMySQL.java
│ ├── sqlquery
│ ├── DimensionSQLQuery.java
│ └── JoinedSQLQuery.java
│ ├── Seetings
│ ├── StreamTableSeetings.java
│ ├── DimensionTableSeetings.java
│ ├── ReadJDBCPro.java
│ └── CreateJDBCInputFormat.java
│ ├── model
│ └── Meeting.java
│ ├── utils
│ ├── BinLogBean.java
│ ├── KafkaConfigUtil.java
│ ├── Tuple2ToMeeting.java
│ └── JsonFilter.java
│ └── Main.java
├── 会议管理系统实时分析总结.assets
├── 总体方案.png
├── raHGlh.jpg
├── siWsAK.jpg
├── 20200713145329100.png
├── image-20200710154201590.png
├── image-20200710154343692.png
└── image-20200710154514531.png
├── .idea
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── .gitignore
├── vcs.xml
├── modules.xml
├── encodings.xml
├── misc.xml
├── libraries
│ ├── Maven__log4j_log4j_1_2_17.xml
│ ├── Maven__com_mchange_c3p0_0_9_5_2.xml
│ ├── Maven__org_lz4_lz4_java_1_5_0.xml
│ ├── Maven__com_101tec_zkclient_0_10.xml
│ ├── Maven__com_typesafe_config_1_3_3.xml
│ ├── Maven__com_google_guava_guava_18_0.xml
│ ├── Maven__commons_io_commons_io_2_4.xml
│ ├── Maven__io_vertx_vertx_core_3_7_0.xml
│ ├── Maven__org_objenesis_objenesis_2_1.xml
│ ├── Maven__aopalliance_aopalliance_1_0.xml
│ ├── Maven__com_alibaba_fastjson_1_2_69.xml
│ ├── Maven__org_slf4j_slf4j_api_1_7_15.xml
│ ├── Maven__com_twitter_chill_2_12_0_7_6.xml
│ ├── Maven__com_twitter_chill_java_0_7_6.xml
│ ├── Maven__commons_cli_commons_cli_1_3_1.xml
│ ├── Maven__commons_lang_commons_lang_2_6.xml
│ ├── Maven__org_codehaus_janino_janino_3_0_9.xml
│ ├── Maven__commons_codec_commons_codec_1_9.xml
│ ├── Maven__org_projectlombok_lombok_1_16_20.xml
│ ├── Maven__org_slf4j_slf4j_log4j12_1_7_7.xml
│ ├── Maven__org_postgresql_postgresql_42_1_4.xml
│ ├── Maven__com_github_luben_zstd_jni_1_3_8_1.xml
│ ├── Maven__com_github_scopt_scopt_2_12_3_5_0.xml
│ ├── Maven__io_netty_netty_all_4_1_6_Final.xml
│ ├── Maven__org_apache_flink_flink_core_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_java_1_9_0.xml
│ ├── Maven__org_jboss_netty_netty_3_2_2_Final.xml
│ ├── Maven__ch_qos_logback_logback_core_1_1_3.xml
│ ├── Maven__com_esotericsoftware_kryo_kryo_2_24_0.xml
│ ├── Maven__com_esotericsoftware_minlog_minlog_1_2.xml
│ ├── Maven__com_google_code_findbugs_jsr305_1_3_9.xml
│ ├── Maven__io_vertx_vertx_sql_common_3_7_0.xml
│ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml
│ ├── Maven__org_apache_zookeeper_zookeeper_3_4_5.xml
│ ├── Maven__org_javassist_javassist_3_19_0_GA.xml
│ ├── Maven__org_reflections_reflections_0_9_10.xml
│ ├── Maven__org_xerial_snappy_snappy_java_1_1_4.xml
│ ├── Maven__io_vertx_vertx_jdbc_client_3_7_0.xml
│ ├── Maven__org_apache_commons_commons_math3_3_5.xml
│ ├── Maven__com_alibaba_otter_canal_common_1_1_2.xml
│ ├── Maven__commons_logging_commons_logging_1_2.xml
│ ├── Maven__org_scala_lang_scala_library_2_12_7.xml
│ ├── Maven__org_scala_lang_scala_reflect_2_12_7.xml
│ ├── Maven__io_netty_netty_codec_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_force_shading_1_9_0.xml
│ ├── Maven__org_apache_kafka_kafka_clients_2_2_0.xml
│ ├── Maven__ch_qos_logback_logback_classic_1_1_3.xml
│ ├── Maven__io_netty_netty_buffer_4_1_30_Final.xml
│ ├── Maven__io_netty_netty_common_4_1_30_Final.xml
│ ├── Maven__mysql_mysql_connector_java_5_1_34.xml
│ ├── Maven__org_scala_lang_scala_compiler_2_12_7.xml
│ ├── Maven__com_alibaba_otter_canal_protocol_1_1_2.xml
│ ├── Maven__org_apache_commons_commons_dbcp2_2_1_1.xml
│ ├── Maven__org_apache_commons_commons_lang3_3_3_2.xml
│ ├── Maven__org_apache_commons_commons_pool2_2_4_2.xml
│ ├── Maven__com_google_protobuf_protobuf_java_3_6_1.xml
│ ├── Maven__io_netty_netty_handler_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_hadoop_fs_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_jdbc_2_12_1_9_0.xml
│ ├── Maven__io_netty_netty_resolver_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_scala_2_12_1_9_0.xml
│ ├── Maven__org_clapper_grizzled_slf4j_2_12_1_3_2.xml
│ ├── Maven__com_typesafe_akka_akka_actor_2_12_2_5_21.xml
│ ├── Maven__com_typesafe_akka_akka_slf4j_2_12_2_5_21.xml
│ ├── Maven__org_apache_commons_commons_compress_1_18.xml
│ ├── Maven__io_netty_netty_codec_dns_4_1_30_Final.xml
│ ├── Maven__io_netty_netty_transport_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_annotations_1_9_0.xml
│ ├── Maven__com_mchange_mchange_commons_java_0_2_11.xml
│ ├── Maven__com_typesafe_akka_akka_stream_2_12_2_5_21.xml
│ ├── Maven__com_typesafe_ssl_config_core_2_12_0_3_7.xml
│ ├── Maven__org_codehaus_janino_commons_compiler_3_0_9.xml
│ ├── Maven__org_reactivestreams_reactive_streams_1_0_2.xml
│ ├── Maven__org_scala_lang_modules_scala_xml_2_12_1_0_6.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_9_8.xml
│ ├── Maven__io_netty_netty_codec_http_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_clients_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_metrics_core_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_runtime_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_common_1_9_0.xml
│ ├── Maven__io_netty_netty_codec_http2_4_1_30_Final.xml
│ ├── Maven__io_netty_netty_codec_socks_4_1_30_Final.xml
│ ├── Maven__com_typesafe_akka_akka_protobuf_2_12_2_5_21.xml
│ ├── Maven__org_apache_calcite_avatica_avatica_core_1_15_0.xml
│ ├── Maven__io_netty_netty_resolver_dns_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_optimizer_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_api_java_1_9_0.xml
│ ├── Maven__org_springframework_spring_tx_3_2_18_RELEASE.xml
│ ├── Maven__commons_collections_commons_collections_3_2_2.xml
│ ├── Maven__io_netty_netty_handler_proxy_4_1_30_Final.xml
│ ├── Maven__org_apache_flink_flink_shaded_guava_18_0_7_0.xml
│ ├── Maven__org_springframework_spring_aop_3_2_18_RELEASE.xml
│ ├── Maven__org_springframework_spring_orm_3_2_18_RELEASE.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_9_8.xml
│ ├── Maven__org_apache_flink_flink_shaded_asm_6_6_2_1_7_0.xml
│ ├── Maven__org_springframework_spring_core_3_2_18_RELEASE.xml
│ ├── Maven__org_springframework_spring_jdbc_3_2_18_RELEASE.xml
│ ├── Maven__org_springframework_spring_beans_3_2_18_RELEASE.xml
│ ├── Maven__org_apache_flink_flink_shaded_jackson_2_9_8_7_0.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml
│ ├── Maven__org_apache_flink_flink_streaming_java_2_12_1_9_0.xml
│ ├── Maven__org_springframework_spring_context_3_2_18_RELEASE.xml
│ ├── Maven__org_apache_flink_flink_connector_kafka_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_streaming_scala_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_api_scala_2_12_1_9_0.xml
│ ├── Maven__org_scala_lang_modules_scala_java8_compat_2_12_0_8_0.xml
│ ├── Maven__org_springframework_spring_expression_3_2_18_RELEASE.xml
│ ├── Maven__org_apache_flink_flink_shaded_netty_4_1_32_Final_7_0.xml
│ ├── Maven__org_apache_flink_flink_connector_kafka_0_9_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_planner_blink_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_runtime_blink_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_connector_kafka_0_10_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_connector_kafka_0_11_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_connector_kafka_base_2_12_1_9_0.xml
│ ├── Maven__org_apache_flink_flink_table_api_java_bridge_2_12_1_9_0.xml
│ ├── Maven__org_scala_lang_modules_scala_parser_combinators_2_12_1_1_1.xml
│ ├── Maven__org_apache_flink_flink_queryable_state_client_java_1_9_0.xml
│ └── Maven__org_apache_flink_flink_table_api_scala_bridge_2_12_1_9_0.xml
├── compiler.xml
├── jarRepositories.xml
└── uiDesigner.xml
├── pom.xml
├── flink.iml
└── README.md
/src/main/resources/kafka.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/java/com/sinks/SinkToHbase.java:
--------------------------------------------------------------------------------
1 | package com.sinks;
2 |
3 | public class SinkToHbase {
4 | }
5 |
--------------------------------------------------------------------------------
/src/main/java/com/sinks/SinkToKafka.java:
--------------------------------------------------------------------------------
1 | package com.sinks;
2 |
3 | public class SinkToKafka {
4 | }
5 |
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/总体方案.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/总体方案.png
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/raHGlh.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/raHGlh.jpg
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/siWsAK.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/siWsAK.jpg
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/20200713145329100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/20200713145329100.png
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/image-20200710154201590.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/image-20200710154201590.png
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/image-20200710154343692.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/image-20200710154343692.png
--------------------------------------------------------------------------------
/会议管理系统实时分析总结.assets/image-20200710154514531.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liwei199411/FlinkStreamETL/HEAD/会议管理系统实时分析总结.assets/image-20200710154514531.png
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/main/java/com/sqlquery/DimensionSQLQuery.java:
--------------------------------------------------------------------------------
1 | package com.sqlquery;
2 | /**
3 | * 维度表查询
4 | * */
5 | public class DimensionSQLQuery {
6 | public static String Query="SELECT * FROM meeting_address";
7 | }
8 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/main/java/com/Seetings/StreamTableSeetings.java:
--------------------------------------------------------------------------------
1 | package com.Seetings;
2 | /**
3 | * 流式数据表
4 | * */
5 | public class StreamTableSeetings {
6 | public static String streamField="meeting_id, meeting_code,address_id,mstart_date,mend_date,proctime.proctime";
7 | public static String streamTableName="meeting_info";
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/resources/database.properties:
--------------------------------------------------------------------------------
1 | ## greenplum
2 | driver=org.postgresql.Driver
3 | url=jdbc:postgresql://ip_address/schema?serverTimezone=GMT=8
4 | Username=***
5 | Password=***
6 |
7 | ## mysql
8 | mysql_driver=com.mysql.jdbc.Driver
9 | mysql_url=jdbc:mysql://master:3306/********
10 | mysql_Username=****
11 | mysql_Password=****
12 |
--------------------------------------------------------------------------------
/src/main/java/com/Seetings/DimensionTableSeetings.java:
--------------------------------------------------------------------------------
1 | package com.Seetings;
2 | /**
3 | * 维度表
4 | * */
5 |
6 | public class DimensionTableSeetings {
7 | public static String DimensionTableName="meeting_address";
8 | public static String DimensionTableField="meetingroom_id,meetingroom_name,location_id,location_name,city";
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/main/java/com/sqlquery/JoinedSQLQuery.java:
--------------------------------------------------------------------------------
1 | package com.sqlquery;
2 | /**
3 | * 流式表与维度表Join
4 | * */
5 | public class JoinedSQLQuery {
6 | public static String Query="SELECT mi.meeting_id, mi.meeting_code,ma.meetingroom_id,ma.meetingroom_name,ma.location_name,ma.city" +
7 | " FROM meeting_info AS mi " +
8 | "LEFT JOIN " +
9 | "meeting_address AS ma " +
10 | "ON mi.address_id=ma.meetingroom_id";
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/com/model/Meeting.java:
--------------------------------------------------------------------------------
1 | package com.model;
2 | import lombok.AllArgsConstructor;
3 | import lombok.Data;
4 | import lombok.NoArgsConstructor;
5 |
6 | /**
7 | * Meeting 实体类对象
8 | * */
9 | @Data
10 | @AllArgsConstructor
11 | @NoArgsConstructor
12 | public class Meeting {
13 | public int meeting_id;
14 | public String meeting_code;
15 | public int meetingroom_id;
16 | public String meetingroom_name;
17 | public String location_name;
18 | public String city;
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__log4j_log4j_1_2_17.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_lz4_lz4_java_1_5_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_101tec_zkclient_0_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_config_1_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_guava_guava_18_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_io_commons_io_2_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_vertx_vertx_core_3_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_alibaba_fastjson_1_2_69.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_15.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_twitter_chill_2_12_0_7_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_twitter_chill_java_0_7_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_cli_commons_cli_1_3_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_janino_janino_3_0_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_projectlombok_lombok_1_16_20.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_log4j12_1_7_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_postgresql_postgresql_42_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_github_luben_zstd_jni_1_3_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_github_scopt_scopt_2_12_3_5_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_all_4_1_6_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_core_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_java_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_netty_netty_3_2_2_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_esotericsoftware_kryo_kryo_2_24_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_esotericsoftware_minlog_minlog_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_vertx_vertx_sql_common_3_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_zookeeper_zookeeper_3_4_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_javassist_javassist_3_19_0_GA.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_reflections_reflections_0_9_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_xerial_snappy_snappy_java_1_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_vertx_vertx_jdbc_client_3_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_math3_3_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_alibaba_otter_canal_common_1_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_scala_library_2_12_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_scala_reflect_2_12_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_force_shading_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_kafka_kafka_clients_2_2_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_buffer_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_common_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_34.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_scala_compiler_2_12_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_alibaba_otter_canal_protocol_1_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_dbcp2_2_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_6_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_handler_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_hadoop_fs_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_jdbc_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_scala_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_clapper_grizzled_slf4j_2_12_1_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_akka_akka_actor_2_12_2_5_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_akka_akka_slf4j_2_12_2_5_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_compress_1_18.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_dns_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_transport_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_annotations_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_akka_akka_stream_2_12_2_5_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_ssl_config_core_2_12_0_3_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_janino_commons_compiler_3_0_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_modules_scala_xml_2_12_1_0_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_http_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_clients_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_metrics_core_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_runtime_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_common_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_http2_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_socks_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_typesafe_akka_akka_protobuf_2_12_2_5_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_calcite_avatica_avatica_core_1_15_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_dns_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_optimizer_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_api_java_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_tx_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_handler_proxy_4_1_30_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_shaded_guava_18_0_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_aop_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_orm_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_shaded_asm_6_6_2_1_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_core_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_jdbc_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_beans_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_shaded_jackson_2_9_8_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_streaming_java_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_context_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_connector_kafka_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_streaming_scala_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_api_scala_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_modules_scala_java8_compat_2_12_0_8_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_expression_3_2_18_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_shaded_netty_4_1_32_Final_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_connector_kafka_0_9_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_planner_blink_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_runtime_blink_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_connector_kafka_0_10_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_connector_kafka_0_11_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_connector_kafka_base_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_api_java_bridge_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_scala_lang_modules_scala_parser_combinators_2_12_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_queryable_state_client_java_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_flink_flink_table_api_scala_bridge_2_12_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/com/utils/BinLogBean.java:
--------------------------------------------------------------------------------
1 | package com.utils;
2 | import lombok.AllArgsConstructor;
3 | import lombok.Data;
4 | import lombok.NoArgsConstructor;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * 暂时没有用到
10 | */
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | public class BinLogBean implements Serializable{
15 | public String data;//最新的数据,为JSON数组,如果是插入则表示最新插入的数据;如果是更新,则表示更新后的最新数据;如果是删除,则表示被删除的数据
16 | public String database;//数据库
17 | public Long es;//事件时间,13位的时间戳
18 | public Long id;//事件操作的序列号,1,2,3
19 | public Boolean isDdl;//是否是DDL操作
20 | public String mysqlType; //字段类型
21 | public String old;//旧数据
22 | public String sql;//SQL 语句
23 | public String sqlType;// 经过Canal转换处理的,unsigned int 会被转化为Long,unsigned long会被转换为BigDecimal
24 | public String table;//TableName
25 | public Long ts;//日志时间戳
26 | public String type;//操作类型,包含Insert,Delete,Update
27 | }
--------------------------------------------------------------------------------
/src/main/java/com/Seetings/ReadJDBCPro.java:
--------------------------------------------------------------------------------
1 | package com.Seetings;
2 |
3 | import java.io.FileReader;
4 | import java.io.IOException;
5 | import java.util.Properties;
6 |
7 | public class ReadJDBCPro {
8 | public static Properties buildGreenPlumJDBCProps(){
9 | Properties properties = new Properties();
10 | try {
11 | properties.load(new FileReader("database.properties"));
12 | } catch (IOException e) {
13 | e.printStackTrace();
14 | }
15 | properties.setProperty("url","jdbc:postgresql://******:5432/datahub?serverTimezone=GMT+8");
16 | properties.setProperty("Username","******");
17 | properties.setProperty("Password","******");
18 | return properties;
19 | }
20 | public static Properties buildMysqlJDBCProps(){
21 | Properties properties = new Properties();
22 | properties.setProperty("url","jdbc:mysql://******:3306/canal_destination??useUnicode=true&characterEncoding=UTF-8");
23 | properties.setProperty("Username","*****");
24 | properties.setProperty("Password","*****");
25 | return properties;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | ################################################################################
18 |
19 | log4j.rootLogger=ERROR, console
20 | #log4j.rootLogger=WARN, console
21 |
22 | log4j.appender.console=org.apache.log4j.ConsoleAppender
23 | log4j.appender.console.layout=org.apache.log4j.PatternLayout
24 | log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
25 |
--------------------------------------------------------------------------------
/src/main/java/com/utils/KafkaConfigUtil.java:
--------------------------------------------------------------------------------
1 | package com.utils;
2 | import lombok.extern.log4j.Log4j;
3 | import java.util.Properties;
4 | /**
5 | * Kafka配置文件
6 | * */
7 | @Log4j
8 | public class KafkaConfigUtil {
9 | public static String topic="example";//Kafka的topic
10 | public static String fieldDelimiter = ",";//字段分隔符,用于分隔Json解析后的字段
11 |
12 | public static Properties buildKafkaProps(){
13 | Properties properties = new Properties();
14 | properties.setProperty("bootstrap.servers", "master:9092,slave01:9092,slave02:9092");
15 | properties.setProperty("zookeeper.connect", "master:2181,slave01:2181,slave02:2181");
16 | properties.setProperty("group.id", "meeting_group3");//
17 | properties.put("auto.offset.reset", "latest");
18 | /** earliest
19 | 当各分区下有已提交的offset时,从提交的offset开始消费;无提交的offset时,从头开始消费
20 | latest
21 | 当各分区下有已提交的offset时,从提交的offset开始消费;无提交的offset时,消费新产生的该分区下的数据
22 | none
23 | topic各分区都存在已提交的offset时,从offset后开始消费;只要有一个分区不存在已提交的offset,则抛出异常
24 | */
25 | properties.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
26 | properties.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
27 |
28 | log.info("get kafka config, config map-> " + properties.toString());
29 | return properties;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/utils/Tuple2ToMeeting.java:
--------------------------------------------------------------------------------
1 | package com.utils;
2 |
3 | import com.model.Meeting;
4 | import org.apache.flink.api.java.tuple.Tuple2;
5 | import org.apache.flink.types.Row;
6 | /**
7 | * 将Tuple转为实体类对象
8 | * */
9 | public class Tuple2ToMeeting {
10 | public Meeting getTuple2ToMeeting(Tuple2 booleanRowTuple2) throws Exception {
11 | Meeting meeting=new Meeting();
12 | meeting.setMeeting_id((Integer) booleanRowTuple2.f1.getField(0));
13 | System.out.println("meeting_id:"+booleanRowTuple2.f1.getField(0));
14 |
15 | meeting.setMeeting_code((String) booleanRowTuple2.f1.getField(1));
16 | System.out.println("meeting_code:"+booleanRowTuple2.f1.getField(1));
17 |
18 | meeting.setMeetingroom_id((Integer) booleanRowTuple2.f1.getField(2));
19 | System.out.println("meetingroom_id:"+booleanRowTuple2.f1.getField(2));
20 |
21 | meeting.setMeetingroom_name((String) booleanRowTuple2.f1.getField(3));
22 | System.out.println("meetingroom_name:"+booleanRowTuple2.f1.getField(3));
23 |
24 | meeting.setLocation_name((String) booleanRowTuple2.f1.getField(4));
25 | System.out.println("location_name:"+booleanRowTuple2.f1.getField(4));
26 |
27 | meeting.setCity((String) booleanRowTuple2.f1.getField(5));
28 | System.out.println("city:"+booleanRowTuple2.f1.getField(5));
29 |
30 | return meeting;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/Seetings/CreateJDBCInputFormat.java:
--------------------------------------------------------------------------------
1 | package com.Seetings;
2 |
3 | import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
4 | import org.apache.flink.api.common.typeinfo.TypeInformation;
5 | import org.apache.flink.api.java.io.jdbc.JDBCInputFormat;
6 | import org.apache.flink.api.java.typeutils.RowTypeInfo;
7 | /**
8 | 会议室维表同步
9 | 目前存在的问题:JDBCInputFormat一次性拿全量数据放入state中,无法感知mysql维表的变化,也会占用大量的state空间。
10 | 后面需要实现用async io+cache+异步jdbc 才可以
11 | 维表
12 | */
13 | public class CreateJDBCInputFormat {
14 | TypeInformation>[] fieldTypes=new TypeInformation>[]{
15 | BasicTypeInfo.INT_TYPE_INFO,
16 | BasicTypeInfo.STRING_TYPE_INFO,
17 | BasicTypeInfo.STRING_TYPE_INFO,
18 | BasicTypeInfo.STRING_TYPE_INFO,
19 | BasicTypeInfo.STRING_TYPE_INFO
20 | };
21 | RowTypeInfo rowTypeInfo=new RowTypeInfo(fieldTypes);
22 | public JDBCInputFormat createJDBCInputFormat(){
23 | JDBCInputFormat jdbcInputFormat=JDBCInputFormat.buildJDBCInputFormat()
24 | .setDrivername("com.mysql.jdbc.Driver")
25 | .setDBUrl("jdbc:mysql://master/canal_test")
26 | .setUsername("root")
27 | .setPassword("root")
28 | .setQuery("SELECT tma.id AS meetingroom_id,tma.name as meetingroom_name,tma.location as location_id,tml.full_name as location_name,tmr.`name` AS city\n" +
29 | "FROM t_meeting_address as tma LEFT JOIN t_meeting_location AS tml \n" +
30 | "ON tma.location=tml.code \n" +
31 | "LEFT JOIN t_meeting_region AS tmr ON tml.region_id=tmr.id") //维表
32 | .setRowTypeInfo(rowTypeInfo)
33 | .finish();
34 | return jdbcInputFormat;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/utils/JsonFilter.java:
--------------------------------------------------------------------------------
1 | package com.utils;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import com.alibaba.fastjson.JSONArray;
5 | import com.alibaba.fastjson.JSONObject;
6 | import com.alibaba.fastjson.parser.Feature;
7 | import org.apache.flink.api.java.tuple.Tuple5;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 | import java.util.Map;
12 |
13 | public class JsonFilter {
14 | public String IsDdl = "false";
15 | public String TableName = "t_meeting_info";
16 | public String Type = "INSERT";
17 | public String Data="data";
18 | public static String fieldDelimiter = ",";//字段分隔符,用于分隔Json解析后的字段
19 |
20 | public JsonFilter() {
21 | }
22 |
23 | public Boolean getJsonFilter(String string) {
24 | JSONObject record = JSON.parseObject(string, Feature.OrderedField);
25 | return record.getString("isDdl").equals(IsDdl) && record.getString("table").equals(TableName) && record.getString("type").equals(Type);
26 | }
27 |
28 | public String dataMap(String jsonvalue) throws Exception {
29 | StringBuilder fieldValue = new StringBuilder();
30 | JSONObject record = JSON.parseObject(jsonvalue, Feature.OrderedField);
31 | //获取最新的字段值
32 | JSONArray data = record.getJSONArray(Data);
33 | //遍历,字段值的JSON数组,只有一个元素
34 | for (int i = 0; i < data.size(); i++) {
35 | //获取data数组的所有字段
36 | JSONObject obj = data.getJSONObject(i);
37 | if (obj != null) {
38 | for (Map.Entry entry : obj.entrySet()) {
39 | fieldValue.append(entry.getValue());
40 | fieldValue.append(fieldDelimiter);
41 | }
42 | }
43 | }
44 | return fieldValue.toString();
45 | }
46 |
47 | public Tuple5 fieldMap(String datafield) throws Exception {
48 | Integer meeting_id= Integer.valueOf(datafield.split("[\\,]")[0]);
49 | String meeting_code=datafield.split("[\\,]")[1];
50 | Integer address_id= Integer.valueOf(datafield.split("[\\,]")[7]);
51 | String mstart_date=datafield.split("[\\,]")[13];
52 | String mend_date=datafield.split("[\\,]")[14];
53 | return new Tuple5(meeting_id, meeting_code,address_id,mstart_date,mend_date) ;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/com/sinks/SinkToGreenplum.java:
--------------------------------------------------------------------------------
1 | package com.sinks;
2 | import com.Seetings.ReadJDBCPro;
3 | import com.model.Meeting;
4 | import org.apache.commons.dbcp2.BasicDataSource;
5 | import org.apache.flink.configuration.Configuration;
6 | import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
7 |
8 | import java.io.FileInputStream;
9 | import java.io.IOException;
10 | import java.sql.Connection;
11 | import java.sql.PreparedStatement;
12 | import java.util.Properties;
13 |
14 | /**
15 | * sink to Greenplum
16 | * */
17 |
18 | public class SinkToGreenplum extends RichSinkFunction{
19 | PreparedStatement ps;
20 | BasicDataSource dataSource;
21 | private Connection connection;
22 | /**
23 | * open() 方法中建立连接,这样不用每次invoke的时候都要建立连接和释放连接
24 | * @param parameters
25 | * @throws Exception
26 | * */
27 |
28 | @Override
29 | public void open(Configuration parameters) throws Exception{
30 | super.open(parameters);
31 | dataSource=new BasicDataSource();
32 | connection=getConnection(dataSource);
33 | String sql="INSERT INTO public .meeting_result(meeting_id, meeting_code, meetingroom_id,meetingroom_name,location_name,city) values(?, ?, ?,?,?,?);";
34 | ps=this.connection.prepareStatement(sql);
35 | }
36 | @Override
37 | public void close() throws Exception {
38 | super.close();
39 | //关闭连接和释放资源
40 | if(connection!=null){
41 | connection.close();
42 | }
43 | if(ps!=null){
44 | connection.close();
45 | }
46 | }
47 |
48 | /**
49 | * 每条数据的插入都需要调用一次invoke()方法
50 | * @param meeting
51 | * @param context
52 | * @throws Exception
53 | * */
54 | @Override
55 | public void invoke(Meeting meeting,Context context) throws Exception{
56 | ps.setInt(1,meeting.getMeeting_id());
57 | ps.setString(2,meeting.getMeeting_code());
58 | ps.setInt(3,meeting.getMeetingroom_id());
59 | ps.setString(4,meeting.getMeetingroom_name());
60 | ps.setString(5,meeting.getLocation_name());
61 | ps.setString(6,meeting.getCity());
62 | ps.executeUpdate();
63 | System.out.println("插入成功:"+meeting.toString());
64 | }
65 |
66 | private static Connection getConnection(BasicDataSource dataSource) {
67 | Properties prop=new Properties();
68 | try {
69 | prop.load(new FileInputStream("D:\\flink\\src\\main\\resources\\database.properties"));
70 | String driver=prop.getProperty("driver");
71 | String url=prop.getProperty("url");
72 | String username=prop.getProperty("Username");
73 | String password=prop.getProperty("Password");
74 |
75 | dataSource.setDriverClassName(driver);
76 | dataSource.setUrl(url);
77 | dataSource.setUsername(username);
78 | dataSource.setPassword(password);
79 | } catch (IOException e) {
80 | e.printStackTrace();
81 | }
82 |
83 | //设置连接池的参数
84 | dataSource.setInitialSize(10);
85 | dataSource.setMaxTotal(50);
86 | dataSource.setMinIdle(2);
87 |
88 | Connection con=null;
89 | try{
90 | con=dataSource.getConnection();
91 | System.out.println("创建连接池:"+con);
92 | } catch (Exception e) {
93 | System.out.println("-----------greenplum get connection has exception,msg=" +e.getMessage());
94 | }
95 | return con;
96 | }
97 | }
--------------------------------------------------------------------------------
/src/main/java/com/sinks/SinkToMySQL.java:
--------------------------------------------------------------------------------
1 | package com.sinks;
2 |
3 | import com.Seetings.ReadJDBCPro;
4 | import com.model.Meeting;
5 | import org.apache.commons.dbcp2.BasicDataSource;
6 | import org.apache.flink.configuration.Configuration;
7 | import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
8 |
9 | import java.io.FileInputStream;
10 | import java.io.IOException;
11 | import java.sql.Connection;
12 | import java.sql.PreparedStatement;
13 | import java.util.Properties;
14 |
15 | /**
16 | * sinktoMysql
17 | * 另外一种实现方法
18 | * */
19 |
20 | public class SinkToMySQL extends RichSinkFunction{
21 | PreparedStatement ps;
22 | BasicDataSource dataSource;
23 | private Connection connection;
24 | /**
25 | * open() 方法中建立连接,这样不用每次invoke的时候都要建立连接和释放连接
26 | * @param parameters
27 | * @throws Exception
28 | * */
29 |
30 | @Override
31 | public void open(Configuration parameters) throws Exception{
32 | super.open(parameters);
33 | dataSource=new BasicDataSource();
34 | connection=getConnection(dataSource);
35 | String sql="replace into meeting_result(meeting_id, meeting_code, meetingroom_id,meetingroom_name,location_name,city) values(?, ?, ?,?,?,?);";
36 | ps=this.connection.prepareStatement(sql);
37 |
38 | }
39 | @Override
40 | public void close() throws Exception {
41 | super.close();
42 | //关闭连接和释放资源
43 | if(connection!=null){
44 | connection.close();
45 | }
46 | if(ps!=null){
47 | connection.close();
48 | }
49 | }
50 | /**
51 | * 每条数据的插入都需要调用一次invoke()方法
52 | * @param meeting
53 | * @param context
54 | * @throws Exception
55 | * */
56 | @Override
57 | public void invoke(Meeting meeting,Context context) throws Exception{
58 | ps.setInt(1,meeting.getMeeting_id());
59 | ps.setString(2,meeting.getMeeting_code());
60 | ps.setInt(3,meeting.getMeetingroom_id());
61 | ps.setString(4,meeting.getMeetingroom_name());
62 | ps.setString(5,meeting.getLocation_name());
63 | ps.setString(6,meeting.getCity());
64 | ps.executeUpdate();
65 | }
66 |
67 | private static Connection getConnection(BasicDataSource dataSource) {
68 | Properties mysqlprop=new Properties();
69 | try {
70 | mysqlprop.load(new FileInputStream("D:\\flink\\src\\main\\java\\com\\sinks\\database.properties"));
71 | String mysqldriver=mysqlprop.getProperty("mysql_driver");
72 | String mysqlurl=mysqlprop.getProperty("mysql_url");
73 | String mysqlusername=mysqlprop.getProperty("mysql_Username");
74 | String mysqlpassword=mysqlprop.getProperty("mysql_Password");
75 |
76 | dataSource.setDriverClassName(mysqldriver);
77 | dataSource.setUrl(mysqlurl);
78 | dataSource.setUsername(mysqlusername);
79 | dataSource.setPassword(mysqlpassword);
80 | } catch (IOException e) {
81 | e.printStackTrace();
82 | }
83 |
84 | //设置连接池的参数
85 | dataSource.setInitialSize(10);
86 | dataSource.setMaxTotal(50);
87 | dataSource.setMinIdle(2);
88 |
89 | Connection con=null;
90 | try{
91 | con=dataSource.getConnection();
92 | System.out.println("创建连接池:"+con);
93 | } catch (Exception e) {
94 | System.out.println("-----------mysql get connection has exception,msg=" +e.getMessage());
95 | }
96 | return con;
97 | }
98 | }
--------------------------------------------------------------------------------
/src/main/java/com/Main.java:
--------------------------------------------------------------------------------
1 | package com;
2 |
3 | import com.Seetings.DimensionTableSeetings;
4 | import com.alibaba.fastjson.JSON;
5 | import com.model.Meeting;
6 | import com.sinks.SinkToGreenplum;
7 | import com.Seetings.CreateJDBCInputFormat;
8 | import com.sqlquery.DimensionSQLQuery;
9 | import com.sqlquery.JoinedSQLQuery;
10 | import com.utils.JsonFilter;
11 | import com.utils.KafkaConfigUtil;
12 | import com.Seetings.StreamTableSeetings;
13 | import com.utils.Tuple2ToMeeting;
14 | import org.apache.flink.api.common.functions.FilterFunction;
15 | import org.apache.flink.api.common.functions.MapFunction;
16 | import org.apache.flink.api.common.serialization.SimpleStringSchema;
17 | import org.apache.flink.api.common.time.Time;
18 | import org.apache.flink.api.java.io.jdbc.JDBCInputFormat;
19 | import org.apache.flink.api.java.tuple.Tuple2;
20 | import org.apache.flink.api.java.tuple.Tuple5;
21 | import org.apache.flink.streaming.api.CheckpointingMode;
22 | import org.apache.flink.streaming.api.TimeCharacteristic;
23 | import org.apache.flink.streaming.api.datastream.DataStream;
24 | import org.apache.flink.streaming.api.datastream.DataStreamSource;
25 | import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
26 | import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
27 | import org.apache.flink.streaming.api.functions.ProcessFunction;
28 | import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer;
29 | import org.apache.flink.table.api.EnvironmentSettings;
30 | import org.apache.flink.table.api.Table;
31 | import org.apache.flink.table.api.java.StreamTableEnvironment;
32 | import org.apache.flink.types.Row;
33 | import org.apache.flink.util.Collector;
34 | import org.slf4j.Logger;
35 | import org.slf4j.LoggerFactory;
36 | import java.util.Properties;
37 |
38 | /**
39 | * Flink 实时计算MysqlBinLog日志,并写入数据库
40 | * */
41 | public class Main {
42 | private static Logger log = LoggerFactory.getLogger(Main.class);
43 | public static void main(String[] args) throws Exception {
44 | /**
45 | * Flink 配置
46 | * */
47 | StreamExecutionEnvironment env=StreamExecutionEnvironment.getExecutionEnvironment();
48 | env.getConfig().disableSysoutLogging(); //设置此可以屏蔽掉日记打印情况
49 | env.enableCheckpointing(1000);////非常关键,一定要设置启动检查点
50 | env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);//设置事件时间
51 | env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
52 | EnvironmentSettings bsSettings=EnvironmentSettings.newInstance()//使用Blink planner、创建TableEnvironment,并且设置状态过期时间,避免Job OOM
53 | .useBlinkPlanner()
54 | .inStreamingMode()
55 | .build();
56 | StreamTableEnvironment tEnv = StreamTableEnvironment.create(env,bsSettings);
57 | tEnv.getConfig().setIdleStateRetentionTime(Time.days(1),Time.days(2));
58 | /**
59 | * Kafka配置
60 | * */
61 | Properties properties = KafkaConfigUtil.buildKafkaProps();//kafka参数配置
62 | FlinkKafkaConsumer consumer = new FlinkKafkaConsumer<>(KafkaConfigUtil.topic, new SimpleStringSchema(), properties);
63 | /**
64 | * 将Kafka-consumer的数据作为源
65 | * 并对Json格式进行解析
66 | * */
67 | SingleOutputStreamOperator> meeting_stream=env.addSource(consumer)
68 | .filter(new FilterFunction() { //过滤掉JSON格式中的DDL操作
69 | @Override
70 | public boolean filter(String jsonVal) throws Exception {
71 | //json格式解析:"isDdl":false,"table":t_meeting_info,"type":"INSERT"
72 | return new JsonFilter().getJsonFilter(jsonVal);
73 | }
74 | })
75 | .map(new MapFunction() {
76 | @Override
77 | //获取字段数据
78 | public String map(String jsonvalue) throws Exception {
79 | return new JsonFilter().dataMap(jsonvalue);
80 | }
81 | }).map(new MapFunction>() {
82 | @Override
83 | public Tuple5 map(String dataField) throws Exception {
84 | return new JsonFilter().fieldMap(dataField);
85 | }
86 | });
87 | /**
88 | * 将流式数据(元组类型)注册为表
89 | * 会议室维表同步
90 | */
91 | tEnv.registerDataStream(StreamTableSeetings.streamTableName,meeting_stream,StreamTableSeetings.streamField);
92 | CreateJDBCInputFormat createJDBCFormat=new CreateJDBCInputFormat();
93 | JDBCInputFormat jdbcInputFormat=createJDBCFormat.createJDBCInputFormat();
94 | DataStreamSource dataStreamSource=env.createInput(jdbcInputFormat);//字段类型
95 | tEnv.registerDataStream(DimensionTableSeetings.DimensionTableName,dataStreamSource,DimensionTableSeetings.DimensionTableField);
96 |
97 | //流表与维表join,并对结果表进行查询
98 | Table meeting_info=tEnv.scan(StreamTableSeetings.streamTableName);
99 | Table meeting_address=tEnv.sqlQuery(DimensionSQLQuery.Query);
100 | Table joined=tEnv.sqlQuery(JoinedSQLQuery.Query);
101 | /**
102 | 对结果表进行查询,TO_TIMESTAMP是Flink的时间函数,对时间格式进行转换,具体请看官网
103 | 只对开始的会议进行转换。 统计空置率指的是统计当下时间里,已经在会议中的会议室,还是已经预定的呢
104 | Table joined=tEnv.sqlQuery("select meeting_id, meeting_code,TO_TIMESTAMP(mstart_date),TO_TIMESTAMP(mend_date),proctime.proctime " +
105 | "from meeting_info " +
106 | "where TO_TIMESTAMP(mstart_date)> stream1 =tEnv.toRetractStream(joined,Row.class).filter(new FilterFunction>() {
114 | @Override
115 | public boolean filter(Tuple2 booleanRowTuple2) throws Exception {
116 | return booleanRowTuple2.f0;
117 | }
118 | });
119 | stream1.print();
120 | */
121 | //适用于维表查询的情况2
122 | DataStream> stream_tosink =tEnv.toRetractStream(joined,Row.class);
123 | stream_tosink.process(new ProcessFunction, Object>() {
124 | private Tuple2 booleanRowTuple2;
125 | private ProcessFunction, Object>.Context context;
126 | private Collector