1.TPC-DS下载地址如下

http://www.tpc.org/tpc_documents_current_versions/current_specifications.asp

1.安装依赖

yum-y install gcc gcc-c++ libstdc++-devel bison byacc flex

2.安装

unzip a3083c5a-55ae-49bc-8d6f-cc2ab508f898-tpc-ds-tool.zip

cd v2.3.0/tools

make

3.生成数据

生成10T数据

./dsdgen -scale10000-dir /dfs/data

后台生成数据

100G数据生成(可以不同机器同时生产秩序改并行度和child后面的数字,注意并行度你自己调整,例如我这里是10,那么就要保证有10个child才能保证数据后续是完整的。)

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 1 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 2 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 3 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 5 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 6 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 7 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 8 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 9 >nohup.log 2>&1 &

nohup ./dsdgen -scale 100 -dir/dfs/data/  -parallel 10 -child 10 >nohup.log 2>&1 &

1)   将本地数据上传到HDFS

2)   用hadoop-shell命令开始上传数据:

3)   nohup hadoop fs -put /dfs/data/* /tpc_ds > nohup.log 2>&1 &

创建hive中的表

git clone https:

//github

.com

/hortonworks/hive-testbench

.git

[root@namenode01 text]# pwd

/root/hive-testbench/ddl-tpcds/text 有创建表语句,自己安装自己更改下

alltables.sqlanalyze_everything.sql

create database tpc_ds;

create database tpc_ds2;

use tpc_ds;

drop table if exists call_center;

create external table call_center(

cc_call_center_sk        bigint

,    cc_call_center_id         string

,    cc_rec_start_date       string

,    cc_rec_end_date         string

,    cc_closed_date_sk        bigint

,    cc_open_date_sk          bigint

,    cc_name                  string

,    cc_class                 string

,    cc_employees              int

,    cc_sq_ft                  int

,    cc_hours                 string

,    cc_manager               string

,    cc_mkt_id                 int

,    cc_mkt_class             string

,    cc_mkt_desc              string

,    cc_market_manager        string

,    cc_division               int

,    cc_division_name         string

,    cc_company                int

,    cc_company_name          string

,    cc_street_number         string

,    cc_street_name           string

,    cc_street_type            string

,    cc_suite_number          string

,    cc_city                  string

,    cc_county                string

,    cc_state                 string

,    cc_zip                   string

,    cc_country               string

,    cc_gmt_offset            double

,    cc_tax_percentage         double

)

row format delimited fields terminatedby '|'

STORED AS textfile; 还有很多,不一一展现了。

加载数据:

LOAD DATA  inpath '/tpc_ds/call_center*.dat' INTO TABLEcall_center;

创建Partquet列式数据存储

use tpc_ds2;

create external table call_center(

cc_call_center_sk        bigint

,    cc_call_center_id        string

,    cc_rec_start_date       string

,    cc_rec_end_date         string

,    cc_closed_date_sk        bigint

,    cc_open_date_sk          bigint

,    cc_name                  string

,    cc_class                  string

,    cc_employees              int

,    cc_sq_ft                  int

,    cc_hours                 string

,    cc_manager               string

,    cc_mkt_id                 int

,    cc_mkt_class             string

,    cc_mkt_desc              string

,    cc_market_manager        string

,    cc_division               int

,    cc_division_name         string

,    cc_company                int

,    cc_company_name          string

,    cc_street_number          string

,    cc_street_name           string

,    cc_street_type           string

,    cc_suite_number          string

,    cc_city                  string

,    cc_county                string

,    cc_state                 string

,    cc_zip                   string

,    cc_country               string

,    cc_gmt_offset            double

,    cc_tax_percentage         double

)

row format delimited fields terminatedby '|' STORED AS PARQUET;

加载数据到partquet数据到表里:

INSERT OVERWRITE TABLE call_center  SELECT * FROM tpc_ds.call_center; 其他表也类似加载,之后就可以进行性能测试。

SQL语句:

select * from

(selecti_manufact_id,sum(ss_sales_price) sum_sales,avg(sum(ss_sales_price)) over(partition by i_manufact_id) avg_quarterly_sales from item,

store_sales, date_dim, store

where ss_item_sk = i_item_sk and

ss_sold_date_sk = d_date_sk and

ss_store_sk = s_store_sk and

d_month_seq in(1212,1212+1,1212+2,1212+3,1212+4,1212+5,1212+6,1212+7,1212+8,1212+9,1212+10,1212+11)and

((i_category in('Books','Children','Electronics') and

i_class in('personal','portable','reference','self-help') and

i_brand in ('scholaramalgamalg#14','scholaramalgamalg #7','exportiunivamalg #9','scholaramalgamalg #9')) or

(i_category in ('Women','Music','Men')and i_class in ('accessories','classical','fragrances','pants') and

i_brand in ('amalgimporto #1','edupackscholar #1','exportiimporto #1','importoamalg #1')))

group by i_manufact_id, d_qoy ) tmp1where case when avg_quarterly_sales > 0 then abs (sum_sales -avg_quarterly_sales)/ avg_quarterly_sales

else null end > 0.1

order by avg_quarterly_sales,sum_sales,

i_manufact_id

limit 100;

2.   Linux 缓冲

echo 3 >/proc/sys/vm/drop_caches

3.   执行时间

tpc ds安装教程 linux,TPC-DS测试hadoop 安装步骤相关推荐

  1. Linux redis安装教程,Linux 下redis5.0.0安装教程详解

    Linux redis5.0.0安装,教程如下所示: 1.从官网下载,然后传到服务器,tar -zxvf解压 2.进入redis ? 3.安装:make, (1)若提示:: gcc: Command ...

  2. linux5.5 dvd安装教程,linux 5.5 yum的安装方法(ftp)

    1.挂载光盘:mount /dev/cdrom /mnt 或(iso文件)mount -t iso9660 /dev/hda  /mnt/cdrom 2.安装软件: rpm -ivh createre ...

  3. linux 下载 驱动怎么安装教程,Linux操作系统下显卡驱动安装方法步骤

    Linux下安装显卡驱动 第一步:下载一个for Linux版的显卡驱动,我下的NVIDIA-Linux-x86-173.08-pkg1.run我的内核是2.6.18-53.el5 第二步:如果查出你 ...

  4. linux系统源码安装教程,linux之源码包安装步骤

    源码:程序代码,人类可看懂的代码 编译程序:将程序代码编译成机器看懂的代码 二进制文件:经过编译程序变为二进制程序后,机器可执行的文件 make和configure: make是一支程序,会自动寻找M ...

  5. linux服务器证书安装教程,linux服务器使用certbot免费安装ssl证书

    这里介绍一个免费的生成https的网站: certbot的官方网站为:https://certbot.eff.org 打开这个链接选择自己使用的 web server 和操作系统,如下图: 选好系统后 ...

  6. seafile服务器版能安装在虚拟机上,seafile安装教程linux

    seafile安装教程linux [2021-02-15 06:48:59]  简介: php去除nbsp的方法:首先创建一个PHP代码示例文件:然后通过"preg_replace(&quo ...

  7. 【安装】Linux系统(X64)安装Oracle 11g

    [安装]Linux系统(X64)安装Oracle 11g 一.修改操作系统核心参数 在Root用户下执行以下步骤: 1)修改用户的SHELL的限制,修改/etc/security/limits.con ...

  8. 用Kickstart批量安装Linux系统、Kickstart安装,linux批量安装;Linux的Kickstart的 无人值守安装;linux pxe自动安装linux系统...

    用Kickstart批量安装Linux|Kickstart,批量安装:Linux的Kickstart的 无人值守安装:linux pxe自动安装linux系统: KickStart + DHCP + ...

  9. Pytorch-gpu版安装教程【注意:无需提前安装cuda和cudnn】

    Pytorch-gpu版安装教程[注意:无需提前安装cuda和cudnn] 1. 首先确保你已经安装好Anaconda 2.查看自己电脑上显卡的信息,通过显卡控制面板查看 3.如何根据想要的cuda的 ...

  10. 2023最新最全git安装教程,保姆级手把手式安装!!!

            目录 一.git简介 二.安装过程 1.首先进入git的官网:https://git-scm.com/然后选择Downloads. 2.接着选择与自己电脑系统对应的下载选项,我的电脑是 ...

最新文章

  1. Centos7 下安装python3及卸载
  2. 华为视觉研究路线图:三大挑战,六项计划
  3. Entity Framework异步查询和保存
  4. 深度学习图片分类CNN模板
  5. 小余学调度:学习记录(2022年1月)
  6. 电路中滤波电容和退耦电容_电子电路中电容的作用,滤波消抖,充放电,耦合,退耦...
  7. 绕过网关访问图片上传并解决跨域问题
  8. python网站攻击脚本_Python scapy 实现一个简易 arp 攻击脚本
  9. HTML---初识HTML
  10. leetcode题库221-- 最大正方形
  11. 剑指Offer面试题:1.实现单例模式
  12. 虚拟机克隆后修改网络部分
  13. Leetcode 627. Swap Salary
  14. 教你玩转HelloWorld
  15. matlab中迪杰斯特拉算法,dijkstra算法(迪杰斯特拉算法)
  16. PHP怎么加入购物车MySQL_php实现简单加入购物车功能
  17. 工业机器人维保调查表_工业机器人日常维护保养
  18. SEO到了岌岌可危的时刻吗?
  19. 分时线的9代表什么_股票早上快速拉高然后慢慢下跌,意味着什么?看完才知道套路...
  20. macOS长按键盘重复输入

热门文章

  1. c语言 去电txt空白行,删除字符串中多余的空白字符和空行(C语言实现)
  2. linux windows10双系统安装教程,【笔记】windows10安装linux双系统教程(可能是现今最简单方法)...
  3. thinkPHP 接口访问限制
  4. tp5与tp6的区别是啥呀?
  5. 动态网页怎样才能被搜索引擎收录
  6. 产品三维可视化展示之服装3d立体展示
  7. matlab计算wsn覆盖率,WSN覆盖率求解
  8. java perfrences_Enterprise Resource Planning (ERP) | Oracle France
  9. sdk烧写flash报error:given target do not exis处理方式
  10. Python实现门禁管理系统(源码)