마스트 노드에서
$ su - gpadmin
TPC-DS Git Repo 크론
git clone https://github.com/gpdbkr/gpmixedworkload.git
파이션 postgresq driver 설치
pip install psycopg2-binary
pg_hba.conf 설정
$ vi /data/master/gpseg-1/pg_hba.conf
local all all trust
host all all 0.0.0.0/0 trust
모든 세그먼트 노드 작업. /home/gpadmin/.bashrc 에 아래 추가
source /usr/local/greenplum-db/greenplum_path.sh
아래와 같이 복사해도 됨.
scp .bashrc sdw2:/home/gpadmin/.bashrc
마스트 노드에서 TPC-DS 수행 준비 1.
cd gpmixedworkload
cd shell
sh gpconfigs.sh
gpstop -u
$ psql -d whpg
whpg=# create database gpadmin;
CREATE DATABASE
마스트 노드에서 TPC-DS 수행 준비 2
cd ../TPC-DS
vi tpcds_variables.sh.init
export GEN_DATA_SCALE="10" # 3000
export MULTI_USER_COUNT="1" # 5
./tpcds.sh
아래 에러 발생하면. /bin/ld: s_purchase.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_purchase.c:55: multiple definition of `nItemIndex'; s_catalog_order.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_catalog_order.c:56: first defined here
/bin/ld: s_web_order.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_web_order.c:56: multiple definition of `nItemIndex'; s_catalog_order.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_catalog_order.c:56: first defined here
/bin/ld: s_web_order_lineitem.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_web_order_lineitem.c:54: multiple definition of `g_s_web_order_lineitem'; s_web_order.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_web_order.c:54: first defined here
/bin/ld: w_catalog_page.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/w_catalog_page.c:52: multiple definition of `g_w_catalog_page'; s_catalog_page.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_catalog_page.c:51: first defined here
/bin/ld: w_warehouse.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/w_warehouse.c:53: multiple definition of `g_w_warehouse'; s_warehouse.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_warehouse.c:51: first defined here
/bin/ld: w_web_site.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/w_web_site.c:59: multiple definition of `g_w_web_site'; s_web_site.o:/home/gpadmin/gpmixedworkload/TPC-DS/00_compile_tpcds/tools/s_web_site.c:51: first defined here
=> variable 앞에 "extern" 추가 하고 재 수행. nItemIndex, g_s_web_order_lineitem 등 등.
아래 에러 발생시 search_path 에 tpcds 추가. ERROR: relation "store_returns" does not exist
ALTER ROLE dsbench SET search_path = "$user", public, tpcds, ext_tpcds;
ALTER ROLE gpadmin SET search_path = "$user", public, gp_toolkit, tpcds;
마스트 노드에서 TPC-DS 수행
nohup ./poc_run_all.sh &
혹은
cd /home/gpadmin/gpmixedworkload/TPC-DS
nohup ./tpcds.sh > tpcds.log 2>&1 < tpcds.log &