EMR部署Kudu
前置准备
部署kudu的节点yum安装cyrus相关包,如果有不通外网的可以在通外网的节点开启yum缓存包配置,将yum包缓存在本地后scp到不通外网的节点在进行yum安装。
yum install cyrus-sasl-plain cyrus-sasl-devel cyrus-sasl-gssapi
先获取kudu包,放在em节点上,在kudu包所在的服务器上执行,127.0.0.1指向的是em服务器的ip
# {package_name}表示为具体的tar包名称 curl http://127.0.0.1:8864/api/v2/product/upload -F 'package=@{package_name}'
EM部署
根据主机中实际情况将tserver的data盘改为如下配置。
冒烟测试
新建impalasql任务,创建kudu表
CREATE TABLE test_student2 ( id INT NOT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION, name STRING NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION, adress STRING NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION, PRIMARY KEY (id) ) PARTITION BY HASH (id) PARTITIONS 20 STORED AS KUDU TBLPROPERTIES ('kudu.master_addresses'='10.168.86.68,10.168.86.69,10.168.86.70') ; INSERT INTO test_student2 VALUES (1, "john","北京"), (2, "jane","天津"), (3, "jim","上海"); select * from test_student2;
FAQ:
Q1:Bad status:Not found:Unable to initialize catalog manager:Failed to initialize sys tables async:Couldnot load tablet metadata from/var/lib/kudu/master/tablet-meta/00000000000000000000000000000000:/var/lib/kudu/master/tablet-meta/00000000000000000000000000000000:No such file or directory (error 2)
A:清掉对应的/data和/wal目录后重启kudu服务。