Flink Version | Description |
1.11 | Unsupported |
1.13 | Supported (use as source and sink) |
1.14 | Supported (use as source and sink) |
1.16 | Unsupported |
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', -- Whether to enable "upsert".'catalog-type' = 'hive','catalog-name'='xxx','catalog-database'='xxx','catalog-table'='xxx',-- The thrift URI of the Hive metastore, which can be obtained from the configuration file hive-site.xm and whose key is "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',-- The thrift URI of the Hive metastore, which can be obtained from the configuration file hive-site.xm and whose key is "hive-metastore-uris".'uri'='thrift://ip:port');
Option | Required | Default Value | Description |
connector | Yes | None | Here, it should be iceberg . |
location | Yes | None | The data storage path, in the format of hdfs:// for data storage in HDFS and COSN://$bucket/$path for data storage in COS. |
catalog-name | Yes | None | A custom catalog name. |
catalog-type | Yes | None | The catalog type. Valid values: hadoop , hive , and custom . |
catalog-database | Yes | None | The name of the Iceberg database. |
catalog-table | Yes | None | The name of the Iceberg table. |
catalog-impl | No | None | This option is required when catalog-type is set to custom . |
uri | No | None | -- The thrift URI of the Hive metastore, which can be obtained from the configuration file hive-site.xm and whose key is "hive-metastore-uris; Eg. thrift://172.28.1.149:7004". |
format-version | No | 1 |
path
to the respective cosn path.hive-site.xml
and hdfs-site.xml
from the following paths in the EMR Hive cluster./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
hadoop
.containerized.taskmanager.env.HADOOP_USER_NAME: hadoopcontainerized.master.env.HADOOP_USER_NAME: hadoop
krb5.conf
, emr.keytab
, core-site.xml
, and hdfs-site.xml
in the following paths./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
vim hdfs-xxx.jar
). Make sure the JAR file includes the following information and has the correct structure.META-INF/META-INF/MANIFEST.MFemr.keytabkrb5.confhdfs-site.xmlcore-site.xml
klist -kt /var/krb5kdc/emr.keytab# The output is as follows (use the first): 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
security.kerberos.login.keytab
and security.kerberos.login.conf
are the respective file names.
Was this page helpful?