当前位置:   article > 正文

Flink Iceberg 测试_oceanus 测试flink mysql到iceberg性能测试

oceanus 测试flink mysql到iceberg性能测试

组件版本

组件

版本

Java

1.8.251

Scala

1.12.14

Flink

1.12.5

Iceberg

0.12.0

Hadoop

2.9.2

Hive

2.3.6

将hdfs-site.xml,core-site.xml,hive-site.xml放入resources下

hadoop_catalog

  1. object TestFlinkSQLOptIcebergHadoopCatalog {
  2. def main(args: Array[String]): Unit = {
  3. // val env = StreamExecutionEnvironment.getExecutionEnvironment
  4. val settings = EnvironmentSettings
  5. .newInstance()
  6. .useBlinkPlanner()
  7. .inBatchMode()
  8. .build()
  9. val tableEnv = TableEnvironment.create(settings)
  10. val DDL =
  11. """
  12. |create catalog hadoop_catalog with (
  13. | 'type' = 'iceberg',
  14. | 'catalog-type' = 'hadoop',
  15. | 'property-version' = '1',
  16. | 'warehouse' = 'hdfs:///user/hive/warehouse/'
  17. |)
  18. |""".stripMargin
  19. tableEnv.executeSql(DDL)
  20. // 两种写法
  21. // tableEnv.executeSql("use catalog hadoop_catalog")
  22. tableEnv.useCatalog("hadoop_catalog")
  23. tableEnv.executeSql("create database if not exists iceberg_db")
  24. // tableEnv.executeSql("use iceberg_db")
  25. tableEnv.useDatabase("iceberg_db")
  26. tableEnv.executeSql("show databases").print()
  27. tableEnv.executeSql("show tables").print()
  28. // 1. 创建表
  29. // val tableDDL =
  30. // """
  31. // |create table if not exists iceberg_test_table (
  32. // | id bigint comment 'unique id',
  33. // | data string
  34. // |) comment 'iceberg test table'
  35. // | partitioned by (data)
  36. // |""".stripMargin
  37. // tableEnv.executeSql(tableDDL)
  38. // tableEnv.executeSql("show tables").print()
  39. // *** 2. 修改表名,暂不支持 hadoop catalog 更改表名等操作,当前仅支持更新设置属性和删除
  40. // tableEnv.executeSql("alter table iceberg_test_table rename to iceberg_test_table2")
  41. // tableEnv.executeSql("show tables").print()
  42. // 3. 删除表
  43. // tableEnv.executeSql("drop table if exists iceberg_test_table")
  44. // tableEnv.executeSql("show tables").print()
  45. // 4. 查询表
  46. // tableEnv.executeSql("show tables").print()
  47. // 5. like 根据已有表创建新表
  48. tableEnv.executeSql("create table iceberg_test_like like iceberg_test_table")
  49. tableEnv.executeSql("show tables").print()
  50. // 6. 修改表属性
  51. // flink1.11后支持
  52. // tableEnv.executeSql("""alter table test_like set ('write.format.default'='avro')""")
  53. // 7. 写入
  54. // tableEnv.executeSql("insert into test_hadoop_table values (1, 'a')")
  55. // tableEnv.executeSql("insert overwrite test_hadoop_table values (2, 'a') ")
  56. // tableEnv.executeSql("insert overwrite test_table PARTITION(data='b') SELECT 6")
  57. // 8. 读取数据
  58. // tableEnv.executeSql("select * from test_hadoop_table").print()
  59. // 9. 写入数据
  60. // val insert =
  61. // """
  62. // |insert into test_like
  63. // |select
  64. // | id, data
  65. // |from test_hadoop_table
  66. // |""".stripMargin
  67. // tableEnv.executeSql(insert)
  68. }
  69. }

hive_catalog

  1. object TestFlinkSQLOptIcebergHiveCatalog {
  2. private var logger: org.slf4j.Logger = _
  3. def main(args: Array[String]): Unit = {
  4. logger = LoggerFactory.getLogger(this.getClass.getSimpleName)
  5. Logger.getLogger("org.apache").setLevel(Level.INFO)
  6. Logger.getLogger("hive.metastore").setLevel(Level.INFO)
  7. Logger.getLogger("akka").setLevel(Level.INFO)
  8. val tableEnv = FlinkUtils.initStreamTableEnvironment()
  9. // val env = StreamExecutionEnvironment.getExecutionEnvironment
  10. //
  11. // val settings = EnvironmentSettings
  12. // .newInstance()
  13. // .useBlinkPlanner()
  14. // .inStreamingMode()
  15. // .build()
  16. //
  17. // streamTable 环境
  18. // val tableEnv = StreamTableEnvironment.create(env, settings)
  19. // batchTable 环境
  20. // val settings = EnvironmentSettings
  21. // .newInstance()
  22. // .useBlinkPlanner()
  23. // .inBatchMode()
  24. // .build()
  25. // val tableEnv = TableEnvironment.create(settings)
  26. // val catalog_name = "hive_catalog"
  27. // val database = "iceberg_test_db"
  28. // val hiveConf = "F:\\workspace\\realtime-lakehouse\\test\\src\\main\\resources"
  29. //
  30. // val hiveCatalog = new HiveCatalog(
  31. // catalog_name,
  32. // null,
  33. // hiveConf
  34. // )
  35. // tableEnv.registerCatalog(catalog_name, hiveCatalog)
  36. // tableEnv.getConfig.setSqlDialect(SqlDialect.HIVE)
  37. // catalog
  38. // val catalogDDL =
  39. // """
  40. // |create catalog hive_catalog with (
  41. // | 'type' = 'iceberg',
  42. // | 'catalog-type' = 'hive',
  43. // | 'uri' = 'thrift://test-lakehouse:9083',
  44. // | 'clients' = '5',
  45. // | 'property-version' = '1',
  46. // | 'warehouse' = 'hdfs://test-lakehouse:9000/user/hive/warehouse/'
  47. // |)
  48. // |""".stripMargin
  49. // tableEnv.executeSql(catalogDDL)
  50. // 两种写法
  51. // // tableEnv.executeSql("use catalog hive_catalog")
  52. // tableEnv.useCatalog("hive_catalog")
  53. // tableEnv.executeSql("show catalogs").print()
  54. //
  55. // val databaseDDL = "create database if not exists iceberg_test_db"
  56. // tableEnv.executeSql(databaseDDL)
  57. //
  58. // tableEnv.useDatabase("iceberg_test_db")
  59. // println(s"current database: ${tableEnv.getCurrentDatabase}")
  60. // tableEnv.executeSql("show databases").print()
  61. // println("list catalogs:")
  62. // tableEnv.listCatalogs().foreach(println)
  63. // tableEnv.listDatabases()
  64. // 1. 创建表
  65. // val tableDDL =
  66. // """
  67. // |create table if not exists iceberg_test_table (
  68. // | id bigint comment 'unique id',
  69. // | data string,
  70. // | primary key (id) not enforced
  71. // |) comment 'iceberg test table'
  72. // | partitioned by (id)
  73. // |""".stripMargin
  74. // tableEnv.executeSql(tableDDL)
  75. // tableEnv.executeSql("show tables").print()
  76. // 2. 修改表名
  77. // tableEnv.executeSql("alter table iceberg_test_table rename to iceberg_test_table2")
  78. // tableEnv.executeSql("show tables").print()
  79. //
  80. // 3. 删除表
  81. // tableEnv.executeSql("drop table if exists iceberg_test_table")
  82. // tableEnv.executeSql("show tables").print()
  83. // 4. 查询表
  84. // tableEnv.executeSql("show tables").print()
  85. // 5. like 根据已有表创建新表
  86. // tableEnv.executeSql("create table iceberg_test_like like iceberg_test_table")
  87. // tableEnv.executeSql("show tables").print()
  88. // 6. 修改表属性
  89. // flink1.11后支持
  90. // tableEnv.executeSql("alter table iceberg_test_like set ('write.format.default'='avro')")
  91. // 7. 写入
  92. // tableAPI
  93. // val statementSet = tableEnv.createStatementSet()
  94. // statementSet.addInsertSql("insert into iceberg_test_table values (1, 'a')")
  95. // statementSet.execute()
  96. // tableEnv.executeSql("insert into iceberg_test_table values (1, 'a'), (2, 'b')")
  97. //+----------------------+--------------------------------+
  98. //| id | data |
  99. //+----------------------+--------------------------------+
  100. //| 1 | a |
  101. //| 2 | b |
  102. //+----------------------+--------------------------------+
  103. // tableEnv.executeSql("insert overwrite iceberg_test_table values (111, 'b')")
  104. //+----------------------+--------------------------------+
  105. //| id | data |
  106. //+----------------------+--------------------------------+
  107. //| 1 | aaa |
  108. //| 2 | b |
  109. //+----------------------+--------------------------------+
  110. // tableEnv.executeSql("insert overwrite iceberg_test_table partition(data='b') select 888")
  111. //+----------------------+--------------------------------+
  112. //| id | data |
  113. //+----------------------+--------------------------------+
  114. //| 2 | b |
  115. //| 1 | ccc |
  116. //+----------------------+--------------------------------+
  117. // 8. 读取数据
  118. // tableEnv.executeSql("select * from iceberg_test_table").print()
  119. // val table = tableEnv.sqlQuery("select * from iceberg_test_table")
  120. // table.printSchema()
  121. // table.execute().print()
  122. // 9. 写入数据
  123. // val insert =
  124. // """
  125. // |insert into iceberg_test_like
  126. // |select
  127. // | id, data
  128. // |from iceberg_test_table
  129. // |""".stripMargin
  130. // tableEnv.executeSql(insert)
  131. // tableEnv.executeSql("select * from iceberg_test_like").print()
  132. // 10. 流读
  133. // val config = tableEnv.getConfig.getConfiguration
  134. // config.setBoolean(TableConfigOptions.TABLE_DYNAMIC_TABLE_OPTIONS_ENABLED, true)
  135. //
  136. // // read all the records
  137. // val readAllDML =
  138. // """
  139. // |select * from iceberg_test_table
  140. // |/*+ options('streaming'='true', 'monitor-interval'='1s')*/
  141. // |""".stripMargin
  142. // tableEnv.executeSql(readAllDML).print()
  143. //
  144. // // read incremental data
  145. // val readIncrementalDML =
  146. // """
  147. // |select * from iceberg_test_table
  148. // |/*+ options('streaming'='true', 'monitor-interval'='1s', 'start-snapshot-id'='8116368287341314212')*/
  149. // |""".stripMargin
  150. // tableEnv.executeSql(readIncrementalDML).print()
  151. // 11. cdc
  152. tableEnv.useCatalog("default_catalog")
  153. val cdcDDL =
  154. """
  155. |create table if not exists iceberg_cdc_source (
  156. | id int,
  157. | data string,
  158. | primary key (id) not enforced
  159. |) with (
  160. | 'connector' = 'mysql-cdc',
  161. | 'hostname' = 'test-lakehouse',
  162. | 'port' = '3306',
  163. | 'username' = 'test',
  164. | 'password' = '123456',
  165. | 'database-name' = 'test_db',
  166. | 'table-name' = 'test',
  167. | 'server-time-zone' = 'Asia/Shanghai'
  168. |)
  169. """.stripMargin
  170. tableEnv.executeSql(cdcDDL)
  171. // output
  172. // tableEnv.executeSql("select * from iceberg_cdc_source").print()
  173. // val printSinkSql =
  174. // """
  175. // |create table if not exists print_sink (
  176. // | id int,
  177. // | data string,
  178. // | primary key (id) not enforced
  179. // |) with (
  180. // | 'connector' = 'print'
  181. // |)
  182. // """.stripMargin
  183. // tableEnv.executeSql(printSinkSql)
  184. //
  185. // tableEnv.executeSql("insert into print_sink select * from iceberg_cdc_source")
  186. // catalog
  187. val catalogDDL =
  188. """
  189. |create catalog hive_catalog with (
  190. | 'type' = 'iceberg',
  191. | 'catalog-type' = 'hive',
  192. | 'uri' = 'thrift://test-lakehouse:9083',
  193. | 'clients' = '5',
  194. | 'property-version' = '1',
  195. | 'warehouse' = 'hdfs://test-lakehouse:9000/user/hive/warehouse/'
  196. |)
  197. |""".stripMargin
  198. tableEnv.executeSql(catalogDDL)
  199. val databaseDDL = "create database if not exists hive_catalog.iceberg_test_db"
  200. tableEnv.executeSql(databaseDDL)
  201. // tableEnv.executeSql("drop table if exists hive_catalog.iceberg_test_db.iceberg_cdc_test")
  202. val tableDDL =
  203. """
  204. |create table if not exists hive_catalog.iceberg_test_db.iceberg_cdc_test (
  205. | id bigint comment 'unique id',
  206. | data string,
  207. | primary key (id) not enforced
  208. |) comment 'iceberg test table'
  209. | partitioned by (id)
  210. | with(
  211. | 'iceberg.format.version' = '2',
  212. // | 'write.metadata.delete-after-commit.enabled' = 'true',
  213. // | 'write.metadata.previous-versions-max' = '100'
  214. | )
  215. |""".stripMargin
  216. tableEnv.executeSql(tableDDL)
  217. val cdcDML =
  218. """
  219. |insert into hive_catalog.iceberg_test_db.iceberg_cdc_test
  220. |select * from default_catalog.default_database.iceberg_cdc_source
  221. |""".stripMargin
  222. tableEnv.executeSql(cdcDML)
  223. // stop cdc after
  224. // tableEnv.executeSql("select * from iceberg_cdc_test").print()
  225. // val config = tableEnv.getConfig.getConfiguration
  226. // config.setBoolean(TableConfigOptions.TABLE_DYNAMIC_TABLE_OPTIONS_ENABLED, true)
  227. // tableEnv.executeSql(
  228. // """
  229. // |select * from iceberg_cdc_test
  230. // |/*+ options('streaming'='true', 'monitor-interval'='1s')*/
  231. // """.stripMargin).print()
  232. }
  233. }

检查数据

建表后

2021-09-24 14:40:31,948 INFO - Successfully committed to table hive_catalog.iceberg_test_db.iceberg_test_table in 2008 ms

+--------------------+

| table name |

+--------------------+

| iceberg_test_table |

+--------------------+

hdfs数据

未写入数据前,只有metastore

metastore信息

  1. {
  2. "format-version" : 1,
  3. "table-uuid" : "efbc787a-6eed-46ef-a2a8-c04b8cbcf1c2",
  4. "location" : "hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table",
  5. "last-updated-ms" : 1632715958040,
  6. "last-column-id" : 2,
  7. "schema" : {
  8. "type" : "struct",
  9. "schema-id" : 0,
  10. "identifier-field-ids" : [ 1 ],
  11. "fields" : [ {
  12. "id" : 1,
  13. "name" : "id",
  14. "required" : true,
  15. "type" : "long"
  16. }, {
  17. "id" : 2,
  18. "name" : "data",
  19. "required" : false,
  20. "type" : "string"
  21. } ]
  22. },
  23. "current-schema-id" : 0,
  24. "schemas" : [ {
  25. "type" : "struct",
  26. "schema-id" : 0,
  27. "identifier-field-ids" : [ 1 ],
  28. "fields" : [ {
  29. "id" : 1,
  30. "name" : "id",
  31. "required" : true,
  32. "type" : "long"
  33. }, {
  34. "id" : 2,
  35. "name" : "data",
  36. "required" : false,
  37. "type" : "string"
  38. } ]
  39. } ],
  40. "partition-spec" : [ {
  41. "name" : "id",
  42. "transform" : "identity",
  43. "source-id" : 1,
  44. "field-id" : 1000
  45. } ],
  46. "default-spec-id" : 0,
  47. "partition-specs" : [ {
  48. "spec-id" : 0,
  49. "fields" : [ {
  50. "name" : "id",
  51. "transform" : "identity",
  52. "source-id" : 1,
  53. "field-id" : 1000
  54. } ]
  55. } ],
  56. "last-partition-id" : 1000,
  57. "default-sort-order-id" : 0,
  58. "sort-orders" : [ {
  59. "order-id" : 0,
  60. "fields" : [ ]
  61. } ],
  62. "properties" : { },
  63. "current-snapshot-id" : -1,
  64. "snapshots" : [ ],
  65. "snapshot-log" : [ ],
  66. "metadata-log" : [ ]
  67. }

修改数据后

  1. ......
  2. "properties" : { },
  3. "current-snapshot-id" : 3357358225130025285,
  4. "snapshots" : [ {
  5. "snapshot-id" : 750183960105471040,
  6. "timestamp-ms" : 1632715970291,
  7. "summary" : {
  8. "operation" : "append",
  9. "flink.job-id" : "c79435a3ae5097eba8842a1816409be5",
  10. "flink.max-committed-checkpoint-id" : "9223372036854775807",
  11. "added-data-files" : "2",
  12. "added-records" : "2",
  13. "added-files-size" : "1354",
  14. "changed-partition-count" : "2",
  15. "total-records" : "2",
  16. "total-files-size" : "1354",
  17. "total-data-files" : "2",
  18. "total-delete-files" : "0",
  19. "total-position-deletes" : "0",
  20. "total-equality-deletes" : "0"
  21. },
  22. "manifest-list" : "hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table/metadata/snap-750183960105471040-1-bc72ec07-52b5-4352-9c6b-1db44c8f85e9.avro",
  23. "schema-id" : 0
  24. }, {
  25. "snapshot-id" :
  26. ......
  27. },
  28. "manifest-list" : "hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table/metadata/snap-3357358225130025285-1-9f5c0553-7a4b-42c7-8199-1f7cff77f3ac.avro",
  29. "schema-id" : 0
  30. } ],
  31. "snapshot-log" : [ {
  32. "timestamp-ms" : 1632715970291,
  33. "snapshot-id" : 750183960105471040
  34. }, {
  35. ......
  36. } ],
  37. "metadata-log" : [ {
  38. "timestamp-ms" : 1632715958040,
  39. "metadata-file" : "hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table/metadata/00000-7f31a7d0-6bd9-45a4-82f6-210ea2aa5f10.metadata.json"
  40. }, {
  41. ......
  42. } ]
  43. }
hdfs dfs -text /.../iceberg_test_db.db/iceberg_test_table/metadata/snap-3357358225130025285-1-9f5c0553-7a4b-42c7-8199-1f7cff77f3ac.avro

{"manifest_path":"hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table/metadata/9f5c0553-7a4b-42c7-8199-1f7cff77f3ac-m1.avro","manifest_length":6030,"partition_spec_id":0,"added_snapshot_id":{"long":3357358225130025285},"added_data_files_count":{"int":1},"existing_data_files_count":{"int":0},"deleted_data_files_count":{"int":0},"partitions":{"array":[{"contains_null":false,"contains_nan":{"boolean":false},"lower_bound":{"bytes":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"upper_bound":{"bytes":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}}]},"added_rows_count":{"long":1},"existing_rows_count":{"long":0},"deleted_rows_count":{"long":0}} 

hdfs dfs -text /.../iceberg_test_db.db/iceberg_test_table/metadata/9f5c0553-7a4b-42c7-8199-1f7cff77f3ac-m0.avro


{"status":2,"snapshot_id":{"long":3357358225130025285},"data_file":{"file_path":"hdfs://test-lakehouse:9000/user/hive/warehouse/iceberg_test_db.db/iceberg_test_table/data/id=1/00007-0-3ccc043d-9d03-4b5c-8268-55c09827927b-00001.parquet","file_format":"PARQUET","partition":{"id":{"long":1}},"record_count":1,"file_size_in_bytes":691,"block_size_in_bytes":67108864,"column_sizes":{"array":[{"key":1,"value":46},{"key":2,"value":54}]},"value_counts":{"array":[{"key":1,"value":1},{"key":2,"value":1}]},"null_value_counts":{"array":[{"key":1,"value":0},{"key":2,"value":0}]},"nan_value_counts":{"array":[]},"lower_bounds":{"array":[{"key":1,"value":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"key":2,"value":"aaa"}]},"upper_bounds":{"array":[{"key":1,"value":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"key":2,"value":"aaa"}]},"key_metadata":null,"split_offsets":{"array":[4]},"sort_order_id":{"int":0}}}

hiveCatalog hive元数据信息会记录 iceberg 表名及 iceberg 元数据位置 metadata_location

 

修改iceberg表名,只会修改hive元数据信息,iceberg元数据metadata不变,也就是hdfs上表目录名和json信息不会变。

删除表,会删除hive元数据信息和iceberg元数据位置信息,会删除hdfs上目录下的metadata下的元数据,但是不会删目录。

Overwrite,会写入新的parquet文件,不会第一时间清理旧文件。

Hive信息

修改后

overwrite后,之前的snapshots 无法再读取

Found overwrite operation, cannot support incremental data in snapshots (8116368287341314212, 3591005179391590033]

另外,Flink cdc mysql8.x问题

Public Key Retrieval is not allowed

MySQL8.0连接验证机制发生了变化,默认使用caching_sha2_password作为身份验证插件,修改为使用mysql_native_password加密规则来校验身份。

alter user 'test'@'%' identified with mysql_native_password by '123456';

Iceberg v1 CDC 不支持deletions,只能初始化CDC时导入,后续有deletions操作数据进入会报错。v2功能还在开发中,暂未对外开放,所以CDC功能目前并不能使用。

 pom文件

  1. <properties>
  2. <!-- project compiler -->
  3. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  4. <maven.compiler.source>1.8</maven.compiler.source>
  5. <maven.compiler.target>1.8</maven.compiler.target>
  6. <!-- maven compiler-->
  7. <scala.maven.plugin.version>3.2.2</scala.maven.plugin.version>
  8. <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
  9. <maven.assembly.plugin.version>3.1.1</maven.assembly.plugin.version>
  10. <!-- sdk -->
  11. <java.version>1.8</java.version>
  12. <scala.version>2.12.13</scala.version>
  13. <scala.binary.version>2.12</scala.binary.version>
  14. <!-- engine-->
  15. <hadoop.version>2.9.2</hadoop.version>
  16. <flink.version>1.12.5</flink.version>
  17. <iceberg.version>0.12.0</iceberg.version>
  18. <hive.version>2.3.9</hive.version>
  19. <!-- <scope.type>provided</scope.type>-->
  20. <scope.type>compile</scope.type>
  21. </properties>
  22. <dependencies>
  23. <!-- scala -->
  24. <dependency>
  25. <groupId>org.scala-lang</groupId>
  26. <artifactId>scala-library</artifactId>
  27. <version>${scala.version}</version>
  28. <scope>${scope.type}</scope>
  29. </dependency>
  30. <!-- flink Dependency -->
  31. <dependency>
  32. <groupId>org.apache.flink</groupId>
  33. <artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
  34. <version>${flink.version}</version>
  35. <scope>${scope.type}</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.flink</groupId>
  39. <artifactId>flink-core</artifactId>
  40. <version>${flink.version}</version>
  41. <scope>${scope.type}</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.apache.flink</groupId>
  45. <artifactId>flink-scala_${scala.binary.version}</artifactId>
  46. <version>${flink.version}</version>
  47. <scope>${scope.type}</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.apache.flink</groupId>
  51. <artifactId>flink-table-common</artifactId>
  52. <version>${flink.version}</version>
  53. <scope>${scope.type}</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.flink</groupId>
  57. <artifactId>flink-table-api-scala-bridge_${scala.binary.version}</artifactId>
  58. <version>${flink.version}</version>
  59. <scope>${scope.type}</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.apache.flink</groupId>
  63. <artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
  64. <version>${flink.version}</version>
  65. <scope>${scope.type}</scope>
  66. </dependency>
  67. <dependency>
  68. <groupId>org.apache.flink</groupId>
  69. <artifactId>flink-table-planner-blink_${scala.binary.version}</artifactId>
  70. <version>${flink.version}</version>
  71. <scope>${scope.type}</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.flink</groupId>
  75. <artifactId>flink-clients_${scala.binary.version}</artifactId>
  76. <version>${flink.version}</version>
  77. <scope>${scope.type}</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.apache.flink</groupId>
  81. <artifactId>flink-csv</artifactId>
  82. <version>${flink.version}</version>
  83. <scope>${scope.type}</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>org.apache.flink</groupId>
  87. <artifactId>flink-json</artifactId>
  88. <version>${flink.version}</version>
  89. <scope>${scope.type}</scope>
  90. </dependency>
  91. <dependency>
  92. <groupId>org.apache.flink</groupId>
  93. <artifactId>flink-orc_${scala.binary.version}</artifactId>
  94. <version>${flink.version}</version>
  95. <scope>${scope.type}</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.apache.flink</groupId>
  99. <artifactId>flink-statebackend-rocksdb_2.11</artifactId>
  100. <version>${flink.version}</version>
  101. <scope>${scope.type}</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.apache.flink</groupId>
  105. <artifactId>flink-sql-connector-kafka_${scala.binary.version}</artifactId>
  106. <version>${flink.version}</version>
  107. <scope>${scope.type}</scope>
  108. </dependency>
  109. <dependency>
  110. <groupId>org.apache.flink</groupId>
  111. <artifactId>flink-statebackend-rocksdb_2.11</artifactId>
  112. <version>${flink.version}</version>
  113. <scope>${scope.type}</scope>
  114. </dependency>
  115. <dependency>
  116. <groupId>org.apache.flink</groupId>
  117. <artifactId>flink-connector-hive_${scala.binary.version}</artifactId>
  118. <version>${flink.version}</version>
  119. <scope>${scope.type}</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>com.alibaba.ververica</groupId>
  123. <artifactId>flink-sql-connector-mysql-cdc</artifactId>
  124. <version>1.2.0</version>
  125. <scope>${scope.type}</scope>
  126. </dependency>
  127. <!-- iceberg Dependency -->
  128. <dependency>
  129. <groupId>org.apache.iceberg</groupId>
  130. <artifactId>iceberg-flink-runtime</artifactId>
  131. <version>${iceberg.version}</version>
  132. <scope>${scope.type}</scope>
  133. </dependency>
  134. <!-- hadoop Dependency-->
  135. <dependency>
  136. <groupId>org.apache.hadoop</groupId>
  137. <artifactId>hadoop-common</artifactId>
  138. <version>${hadoop.version}</version>
  139. <scope>${scope.type}</scope>
  140. </dependency>
  141. <dependency>
  142. <groupId>org.apache.hadoop</groupId>
  143. <artifactId>hadoop-hdfs</artifactId>
  144. <version>${hadoop.version}</version>
  145. <scope>${scope.type}</scope>
  146. </dependency>
  147. <dependency>
  148. <groupId>org.apache.hadoop</groupId>
  149. <artifactId>hadoop-client</artifactId>
  150. <version>${hadoop.version}</version>
  151. <scope>${scope.type}</scope>
  152. </dependency>
  153. <!-- hive Dependency-->
  154. <dependency>
  155. <groupId>org.apache.hive</groupId>
  156. <artifactId>hive-exec</artifactId>
  157. <version>${hive.version}</version>
  158. <scope>${scope.type}</scope>
  159. <exclusions>
  160. <exclusion>
  161. <groupId>org.apache.logging.log4j</groupId>
  162. <artifactId>log4j-slf4j-impl</artifactId>
  163. </exclusion>
  164. <exclusion>
  165. <groupId>org.apache.hive</groupId>
  166. <artifactId>hive-llap-tez</artifactId>
  167. </exclusion>
  168. </exclusions>
  169. </dependency>
  170. <dependency>
  171. <groupId>org.antlr</groupId>
  172. <artifactId>antlr-runtime</artifactId>
  173. <version>3.5.2</version>
  174. </dependency>
  175. </dependencies>
  176. <build>
  177. <plugins>
  178. <plugin>
  179. <groupId>net.alchim31.maven</groupId>
  180. <artifactId>scala-maven-plugin</artifactId>
  181. <version>${scala.maven.plugin.version}</version>
  182. <executions>
  183. <execution>
  184. <goals>
  185. <!--声明绑定到maven的compile阶段-->
  186. <goal>compile</goal>
  187. </goals>
  188. </execution>
  189. </executions>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.apache.maven.plugins</groupId>
  193. <artifactId>maven-assembly-plugin</artifactId>
  194. <version>${maven.assembly.plugin.version}</version>
  195. <configuration>
  196. <descriptorRefs>
  197. <descriptorRef>jar-with-dependencies</descriptorRef>
  198. </descriptorRefs>
  199. </configuration>
  200. <executions>
  201. <execution>
  202. <id>make-assembly</id>
  203. <phase>package</phase>
  204. <goals>
  205. <goal>single</goal>
  206. </goals>
  207. </execution>
  208. </executions>
  209. </plugin>
  210. </plugins>
  211. </build>
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/1001411
推荐阅读
相关标签
  

闽ICP备14008679号