安装apache的kudu
第一步:下载rpm包
http://archive.cloudera.com/kudu/redhat/6/x86_64/kudu/5.11.0/RPMS/x86_64/
第二步:安装rpm包
[root@hadoop5 kudu]# yum -y install cyrus-sasl-plain lsb ntp
[root@hadoop5 kudu]# rpm -ivh *
第三步:配置文件
配置主、从机
/etc/kudu/conf/tserver.gflagfile
–tserver_master_addrs=hadoop5:7051
/etc/default/kudu-master
export FLAGS_rpc_bind_addresses=hadoop5:7051
/etc/default/kudu-tserver
export FLAGS_rpc_bind_addresses=hadoop6:7050
第四步:设置ntpd服务
第五步:设置目录权限
mkdir /opt/var/lib/kudu -p
chown -R kudu:kudu /opt/var/lib/kudu
第六步:启动kudu
[root@hadoop5 default]# /etc/init.d/kudu-master start
[root@hadoop6 default]# /etc/init.d/kudu-tserver start
第七步:在ui访问kudu
http://192.168.0.119:8051/
http://192.168.0.120:8050/
安装apache的impala-kudu
第一步:
http://archive.cloudera.com/beta/impala-kudu/redhat/6/x86_64/impala-kudu/0/RPMS/x86_64/
http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/RPMS/noarch/
第二步:
rpm -ivh bigtop-utils-0.7.0+cdh5.12.0+0-1.cdh5.12.0.p0.37.el6.noarch.rpm
rpm -ivh impala-kudu-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm –nodeps
rpm -ivh impala-kudu-catalog-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh impala-kudu-state-store-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh impala-kudu-server-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
yum install -y python-setuptools
rpm -ivh impala-kudu-shell-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh impala-kudu-udf-devel-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
主节点安装catalog和state-store
从节点不要安装catalog和state-store
第三步:
vim /etc/default/bigtop-utils
export JAVA_HOME=/home/local/jdk1.8.0_131/
vim /etc/default/impala
IMPALA_CATALOG_SERVICE_HOST=192.168.0.116
IMPALA_STATE_STORE_HOST=192.168.0.116
cd /etc/impala/conf.dist
cp -a /opt/cloudera/parcels/CDH/lib/hadoop/etc/hadoop/core-site.xml .
cp -a /opt/cloudera/parcels/CDH/lib/hadoop/etc/hadoop/hdfs-site.xml .
安装CDH的kudu
第一步:
下载地址:
http://archive.cloudera.com/kudu/csd/KUDU-5.10.0.jar
csd文件夹
KUDU-5.10.2.jar
第二步:
下载地址:
http://archive.cloudera.com/kudu/parcels/latest/KUDU-1.2.0-1.cdh5.10.0.p0.55-el6.parcel
parcel-repo文件夹
KUDU-1.3.0-1.cdh5.11.0.p0.12-el6.parcel
KUDU-1.3.0-1.cdh5.11.0.p0.12-el6.parcel.sha
安装CDH的impala-kudu
第一步:
http://archive.cloudera.com/beta/impala-kudu/parcels/1.1.0/
将parcel文件和parcel.sha文件放置到parcel-repo文件夹中
第二步:
alternatives –display impala-shell
更换impala-shell对应的版本
alternatives –set impala-shell /opt/cloudera/parcels/IMPALA_KUDU-2.7.0-3.cdh5.9.0.p0.10/bin/impala-shell
测试:
CREATE TABLE my_first_table (
id BIGINT PRIMARY KEY,
name STRING
)
PARTITION BY HASH PARTITIONS 2
STORED AS KUDU
TBLPROPERTIES(‘kudu.master_addresses’ = ‘10.27.5.79:7051’) ;
insert into my_first_table values(100,’2017-08-27 21:46:04’);
insert into my_first_table values(101,’2017-08-28 21:46:04’);
insert into my_first_table values(102,’2017-08-26 21:46:04’);
insert into my_first_table values(103,’2017-08-29 21:46:04’);
insert into my_first_table values(104,’2017-08-25 21:46:04’);
select * from my_first_table where name > ‘2017-08-25 21:46:04’;
CREATE TABLE my_first_table_2 (
id BIGINT PRIMARY KEY,
time UNIXTIME_MICROS
)
PARTITION BY HASH PARTITIONS 2
STORED AS KUDU
TBLPROPERTIES(‘kudu.master_addresses’ = ‘hadoop11:7051’);
原文链接: http://blog.csdn.net/weixin_39478115/article/details/78469962