栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

iceberg集成Hive

iceberg集成Hive

添加jar包

wget https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-hive-runtime/0.13.1/iceberg-hive-runtime-0.13.1.jar
方法1:放到hive的lib目录下
方法2:add jar /path/to/iceberg-hive-runtime-0.13.1.jar;

注册catalog

SET iceberg.catalog.another_hive.type=hive;
SET iceberg.catalog.another_hive.uri=thrift://es2:9083;
SET iceberg.catalog.another_hive.clients=10;
SET iceberg.catalog.another_hive.warehouse=hdfs://bigdataytx/iceberg/hive;

创建指定catalog的iceberg表

SET iceberg.catalog.hadoop_cat.type=hadoop;
SET iceberg.catalog.hadoop_cat.warehouse=hdfs://bigdataytx/iceberg/hadoop_cat;
CREATE TABLE test.ice_test (
  id bigint, name string
) PARTITIonED BY (
  dept string
) STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'
LOCATION 'hdfs://bigdataytx/iceberg/hadoop_cat/test/ice_test'
TBLPROPERTIES ('iceberg.catalog'='hadoop_cat');

插入数据

insert into ice_test values(1,"justin",current_date());

删除iceberg表

drop table ice_test;
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/747823.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号