Flink 版本 | 说明 |
1.11 | 不支持 |
1.13 | 支持 Source 和 Sink |
1.14 | 支持 Source 和 Sink |
1.16 | 不支持 |
CREATE TABLE `sink` (`id` bigint,`YCSB_KEY` string,`FIELD0` string,`FIELD1` string,`FIELD2` string,`database_name` string,`table_name` string,`op_ts` timestamp(3),`date` string) PARTITIONED BY (`date`) WITH ('connector' = 'iceberg','hdfs://HDFS14979/usr/hive/warehouse','write.upsert.enabled'='false', -- 是否开启upsert'catalog-type' = 'hive','catalog-name'='xxx','catalog-database'='xxx','catalog-table'='xxx',-- Hive metastore 的 thrift URI,可以从hive-site.xml配置文件中获取,对应的Key为:hive-metastore-uris'uri'='thrift://ip:port','engine.hive.enabled' = 'true','format-version' = '2');
CREATE TABLE `icesource` (`id` bigint,`YCSB_KEY` string,`FIELD0` string,`FIELD1` string,`FIELD2` string,`database_name` string,`table_name` string,`op_ts` timestamp(3),PRIMARY KEY(id) NOT ENFORCED) WITH ('connector' = 'iceberg','catalog-name' = 'hive_catalog','catalog-type' = 'hive','catalog-database' = 'database_ta','catalog-table' = 't_p1_hive3_avro_3','warehouse'='hdfs://HDFS14979/usr/hive/warehouse','engine.hive.enabled' = 'true','format-version' = '2','streaming'='true','monitor-interval'='10',-- Hive metastore 的 thrift URI,可以从hive-site.xml配置文件中获取,对应的Key为:hive-metastore-uris'uri'='thrift://ip:port');
参数值 | 必填 | 默认值 | 描述 |
connector | 是 | 无 | 必须填 iceberg |
location | 是 | 无 | 数据的存储路径(如果存储到 HDFS,格式为 hdfs:// ;存储为 COS 为 COSN://$bucket/$path) |
catalog-name | 是 | 无 | 自定义的 catalog 名 |
catalog-type | 是 | 无 | catalog 类型,可选值为 hadoop / hive / custom |
catalog-database | 是 | 无 | iceberg 数据库名称 |
catalog-table | 是 | 无 | iceberg 表名称 |
catalog-impl | 否 | 无 | catalog-type 为 custom时,必填 |
uri | 否 | 无 | Hive metastore 的 thrift URI,可以从 hive-site.xml 配置文件中获取,对应的 Key 为:hive-metastore-uris; Eg. thrift://172.28.1.149:7004 |
format-version | 否 | 1 | Iceberg 格式 请参见 Iceberg Table Spec |
/usr/local/service/hadoop/etc/hadoop/hdfs-site.xml
jar -cvf hdfs-xxx.jar hdfs-site.xml
vi hdfs-xxx.jar
META-INF/META-INF/MANIFEST.MFhdfs-site.xml
containerized.taskmanager.env.HADOOP_USER_NAME: hadoopcontainerized.master.env.HADOOP_USER_NAME: hadoop
/etc/krb5.conf/var/krb5kdc/emr.keytab/usr/local/service/hadoop/etc/hadoop/core-site.xml/usr/local/service/hadoop/etc/hadoop/hdfs-site.xml
jar cvf hdfs-xxx.jar krb5.conf emr.keytab core-site.xml hdfs-site.xml
META-INF/META-INF/MANIFEST.MFemr.keytabkrb5.confhdfs-site.xmlcore-site.xml
klist -kt /var/krb5kdc/emr.keytab# 输出如下所示,选取第一个即可:hadoop/172.28.28.51@EMR-OQPO48B9KVNO Timestamp Principal---- ------------------- ------------------------------------------------------2 08/09/2021 15:34:40 hadoop/172.28.28.51@EMR-OQPO48B92 08/09/2021 15:34:40 HTTP/172.28.28.51@EMR-OQPO48B92 08/09/2021 15:34:40 hadoop/VM-28-51-centos@EMR-OQPO48B92 08/09/2021 15:34:40 HTTP/VM-28-51-centos@EMR-OQPO48B9
containerized.taskmanager.env.HADOOP_USER_NAME: hadoopcontainerized.master.env.HADOOP_USER_NAME: hadoopsecurity.kerberos.login.principal: hadoop/172.28.28.51@EMR-OQPO48B9security.kerberos.login.keytab: emr.keytabsecurity.kerberos.login.conf: krb5.conf
本页内容是否解决了您的问题?