impala性能测试
2018-10-18 本文已影响0人
WJXZ
1.获取工具
git clone https://github.com/electrum/tpch-dbgen
git clone https://github.com/kj-ki/tpc-h-impala
2.生成数据
cd tpch-dbgen
make
./dbgen -s 1 (备注-> 1G)
3.将数据复制到hadoop
cd ../tpc-h-impala
mv ../tpch-dbgen/*.tbl ./data/
cp -r data /tmp/data
cd /tmp/data
vim tpch_prepare_data.sh
#清空并加入下列内容
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/customer
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/lineitem
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/nation
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/orders
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/part
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/partsupp
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/region
sudo -u hdfs /usr/bin/hadoop fs -mkdir /tpch/supplier
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal customer.tbl /tpch/customer/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal lineitem.tbl /tpch/lineitem/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal nation.tbl /tpch/nation/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal orders.tbl /tpch/orders/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal part.tbl /tpch/part/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal partsupp.tbl /tpch/partsupp/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal region.tbl /tpch/region/
sudo -u hdfs /usr/bin/hadoop fs -copyFromLocal supplier.tbl /tpch/supplier/
#保存退出
./tpch_prepare_data.sh
4.创建数据表
cd ~/tpc-h-impala
./tpch_benchmark.sh
#报错则进入impala-shell
invalidate metadata;
#重新执行
./tpch_benchmark.sh