Hadoop

95.TPC-DS的编译和使用

2022-01-21  本文已影响0人  大勇任卷舒

95.1 演示环境介绍

95.2 操作演示

1.准备环境

http://www.tpc.org/tpc_documents_current_versions/current_specifications.asp
[root@ip-186-31-16-68 ~]# unzip v2.8.0rc4.zip 
[root@ip-186-31-16-68 ~]# yum -y install gcc gcc-c++ expect

2.TPC-DS编译

[root@ip-186-31-16-68 v2.8.0rc4]# cd tools/
[root@ip-186-31-16-68 tools]# pwd
/root/v2.8.0rc4/tools
[root@ip-186-31-16-68 tools]# pwd
/root/v2.8.0rc4/tools
[root@ip-186-31-16-68 tools]# make

3.建表语句

[root@ip-186-31-16-68 tools]# pwd
/root/v2.8.0rc4/tools
[root@ip-186-31-16-68 tools]# ll *.sql

4.生成测试数据

[root@ip-186-31-16-68 tools]# mkdir /root/tpcdsdata
[root@ip-186-31-16-68 tools]# cd /root/v2.8.0rc4/tools/               
[root@ip-186-31-16-68 tools]# ./dsdgen -SCALE 1GB -DIR /root/tpcdsdata 
[root@ip-186-31-16-68 tools]# ll /root/tpcdsdata/
[root@ip-186-31-16-68 tools]# cd /root/tpcdsdata/
[root@ip-186-31-16-68 tpcdsdata]# du -sh .
[root@ip-186-31-16-68 tools]# ./dsdgen -SCALE 1GB -DIR /root/tpcdsdata -parallel 4 -child 4

5.模板生成查询语句

[root@ip-186-31-16-68 tools]# ./dsqgen -input ../query_templates/templates.lst -directory ../query_templates -dialect oracle -scale 1GB -OUTPUT_DIR /root/tpcdsdata/query_oracle
[root@ip-186-31-16-68 tools]# ./dsqgen -input ../query_templates/templates.lst -directory ../query_templates -dialect oracle -scale 1GB -OUTPUT_DIR /root/tpcdsdata/query_oracle
qgen2 Query Generator (Version 2.8.0)
Copyright Transaction Processing Performance Council (TPC) 2001 - 2018
Warning: This scale factor is valid for QUALIFICATION ONLY
ERROR: Substitution'_END' is used before being initialized at line 59 in ../query_templates/query3.tpl
[root@ip-186-31-16-68 tools]# 

6.总结

大数据视频推荐:
腾讯课堂
CSDN
大数据语音推荐:
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

上一篇 下一篇

猜你喜欢

热点阅读