更新时间:2024-12-11 GMT+08:00
Impala 4.3.0版本,开启Ranger后如何对接kudu外表?
问题
开启Ranger鉴权后,使用如下语句创建外表报错:
CREATE TABLE db.table (id INT, dt TIMESTAMP, PRIMARY KEY(id)) PARTITION BY HASH PARTITIONS 16 STORED AS KUDU TBLPROPERTIES ( 'kudu.master_addresses' = 'master1:7051,master2:7051,master3:7051' );
报错如下:
CREATE TABLE db.table STORED AS KUDU TBLPROPERTIES ( 'kudu.table_name' = 'impala::db.table', 'kudu.master_addresses' = 'master1:7051,master2:7051,master3:7051' );
报错如下:
回答
当前Impala版本开启Ranger鉴权后,暂不支持创建Kudu外表。
如果当前集群中无Kudu服务,需要在Impalad的自定义配置中指定--kudu_master_hosts=master1:7051,master2:7051,master3:7051
如果当前MRS集群中有Kudu服务则无需添加该配置,--kudu_master_hosts默认为该当前集群的KuduMaster地址)。
然后执行如下命令创建kudu内表:
CREATE TABLE db.table (id INT, dt TIMESTAMP, PRIMARY KEY(id))
PARTITION BY HASH PARTITIONS 16
STORED AS KUDU
父主题: Impala常见问题