forked from geetha-hortonworks/hive-testbench
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added most of TPC-H, some queries need to be fixed.
Major improvements to the build and generate scripts.
- Loading branch information
cartershanklin
committed
Mar 28, 2014
1 parent
822aa6b
commit 2b4fa2e
Showing
23 changed files
with
864 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists lineitem; | ||
create external table lineitem | ||
(L_ORDERKEY INT, | ||
L_PARTKEY INT, | ||
L_SUPPKEY INT, | ||
L_LINENUMBER INT, | ||
L_QUANTITY DOUBLE, | ||
L_EXTENDEDPRICE DOUBLE, | ||
L_DISCOUNT DOUBLE, | ||
L_TAX DOUBLE, | ||
L_RETURNFLAG STRING, | ||
L_LINESTATUS STRING, | ||
L_SHIPDATE STRING, | ||
L_COMMITDATE STRING, | ||
L_RECEIPTDATE STRING, | ||
L_SHIPINSTRUCT STRING, | ||
L_SHIPMODE STRING, | ||
L_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/lineitem'; | ||
|
||
drop table if exists part; | ||
create external table part (P_PARTKEY INT, | ||
P_NAME STRING, | ||
P_MFGR STRING, | ||
P_BRAND STRING, | ||
P_TYPE STRING, | ||
P_SIZE INT, | ||
P_CONTAINER STRING, | ||
P_RETAILPRICE DOUBLE, | ||
P_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/part/'; | ||
|
||
drop table if exists supplier; | ||
create external table supplier (S_SUPPKEY INT, | ||
S_NAME STRING, | ||
S_ADDRESS STRING, | ||
S_NATIONKEY INT, | ||
S_PHONE STRING, | ||
S_ACCTBAL DOUBLE, | ||
S_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/supplier/'; | ||
|
||
drop table if exists partsupp; | ||
create external table partsupp (PS_PARTKEY INT, | ||
PS_SUPPKEY INT, | ||
PS_AVAILQTY INT, | ||
PS_SUPPLYCOST DOUBLE, | ||
PS_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION'${LOCATION}/partsupp'; | ||
|
||
drop table if exists nation; | ||
create external table nation (N_NATIONKEY INT, | ||
N_NAME STRING, | ||
N_REGIONKEY INT, | ||
N_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/nation'; | ||
|
||
drop table if exists region; | ||
create external table region (R_REGIONKEY INT, | ||
R_NAME STRING, | ||
R_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/region'; | ||
|
||
drop table if exists customer; | ||
create external table customer (C_CUSTKEY INT, | ||
C_NAME STRING, | ||
C_ADDRESS STRING, | ||
C_NATIONKEY INT, | ||
C_PHONE STRING, | ||
C_ACCTBAL DOUBLE, | ||
C_MKTSEGMENT STRING, | ||
C_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/customer'; | ||
|
||
drop table if exists orders; | ||
create external table orders (O_ORDERKEY INT, | ||
O_CUSTKEY INT, | ||
O_ORDERSTATUS STRING, | ||
O_TOTALPRICE DOUBLE, | ||
O_ORDERDATE STRING, | ||
O_ORDERPRIORITY STRING, | ||
O_CLERK STRING, | ||
O_SHIPPRIORITY INT, | ||
O_COMMENT STRING) | ||
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE | ||
LOCATION '${LOCATION}/orders'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists customer; | ||
|
||
create table customer | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.customer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists lineitem; | ||
|
||
create table lineitem | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.lineitem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists nation; | ||
|
||
create table nation | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.nation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists orders; | ||
|
||
create table orders | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.orders; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists part; | ||
|
||
create table part | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.part; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists partsupp; | ||
|
||
create table partsupp | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.partsupp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists region; | ||
|
||
create table region | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.region; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
create database if not exists ${DB}; | ||
use ${DB}; | ||
|
||
drop table if exists supplier; | ||
|
||
create table supplier | ||
stored as ${FILE} | ||
as select * from ${SOURCE}.supplier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
set hive.enforce.bucketing=true; | ||
set hive.enforce.sorting=true; | ||
set hive.exec.dynamic.partition.mode=nonstrict; | ||
set hive.exec.max.dynamic.partitions.pernode=1000000; | ||
set hive.exec.max.dynamic.partitions=1000000; | ||
set hive.exec.max.created.files=1000000; | ||
set hive.map.aggr=true; | ||
set hive.optimize.bucketmapjoin=true; | ||
set hive.optimize.bucketmapjoin.sortedmerge=true; | ||
set hive.mapred.reduce.tasks.speculative.execution=false; | ||
set mapreduce.reduce.speculative=false; | ||
set hive.auto.convert.join=true; | ||
set hive.auto.convert.sortmerge.join=true; | ||
set hive.auto.convert.sortmerge.join.noconditionaltask=true; | ||
set hive.auto.convert.join.noconditionaltask=true; | ||
set hive.auto.convert.join.noconditionaltask.size=10000000000; | ||
set hive.optimize.reducededuplication.min.reducer=1; | ||
set hive.optimize.mapjoin.mapreduce=true; | ||
set hive.stats.autogather=true; | ||
|
||
set mapred.reduce.parallel.copies=30; | ||
set mapred.reduce.tasks=16; | ||
set mapred.job.shuffle.input.buffer.percent=0.5; | ||
set mapred.job.reduce.input.buffer.percent=0.2; | ||
set mapred.map.child.java.opts=-server -Xmx2248m -Djava.net.preferIPv4Stack=true; | ||
set mapred.reduce.child.java.opts=-server -Xmx4500m -Djava.net.preferIPv4Stack=true; | ||
set mapred.map.child.java.opts=-server -Xmx2800m -Djava.net.preferIPv4Stack=true; | ||
set mapred.reduce.child.java.opts=-server -Xmx3800m -Djava.net.preferIPv4Stack=true; | ||
set mapreduce.map.memory.mb=3072; | ||
set mapreduce.reduce.memory.mb=6144; | ||
set hive.optimize.tez=true; | ||
set mapreduce.reduce.memory.mb=4096; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
# Check for all the stuff I need to function. | ||
for f in gcc; do | ||
which $f > /dev/null 2>&1 | ||
if [ $? -ne 0 ]; then | ||
echo "Required program $f is missing. Please install it and try again." | ||
exit 1 | ||
fi | ||
done | ||
|
||
# Check if Maven is installed and install it if not. | ||
which mvn > /dev/null 2>&1 | ||
if [ $? -ne 0 ]; then | ||
echo "Maven not found, automatically installing it." | ||
curl -O http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz 2> /dev/null | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to download Maven, check Internet connectivity and try again." | ||
exit 1 | ||
fi | ||
tar -zxf apache-maven-3.0.5-bin.tar.gz > /dev/null | ||
CWD=$(pwd) | ||
export MAVEN_HOME="$CWD/apache-maven-3.0.5" | ||
export PATH=$PATH:$MAVEN_HOME/bin | ||
fi | ||
|
||
echo "Building TPC-DS Data Generator" | ||
(cd tpcds-gen; make) | ||
echo "TPC-DS Data Generator built, you can now use tpcds-setup.sh to generate data." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.