Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions runSuite.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
} # end if
my @queries = glob '*.sql';

my $db = {
my $db = {
'tpcds' => "tpcds_bin_partitioned_orc_$scale",
'tpch' => "tpch_flat_orc_$scale"
};
Expand All @@ -36,7 +36,7 @@
my $cmd="echo 'use $db->{${suite}}; source $query;' | hive -i testbench.settings 2>&1 | tee $query.log";
# my $cmd="cat $query.log";
#print $cmd ; exit;

my $hiveStart = time();

my @hiveoutput=`$cmd`;
Expand All @@ -45,13 +45,16 @@
my $hiveEnd = time();
my $hiveTime = $hiveEnd - $hiveStart;
foreach my $line ( @hiveoutput ) {
if( $line =~ /Time taken:\s+([\d\.]+)\s+seconds,\s+Fetched:\s+(\d+)\s+row/ ) {
print "$query,success,$hiveTime,$2\n";
} elsif(
$line =~ /^FAILED: /
# || /Task failed!/
if( $line =~ /(([\d,])+|No) row(s)? selected \((([\d\.]+)\s+seconds)\)/ ) {
my $queryTime = $5;
my $numRows = $1 eq "No" ? 0 : $1;
$numRows =~ s/,//;
print "$query,success,$queryTime,$numRows\n";
} elsif(
$line =~ /^Error: /
# || /Task failed!/
) {
print "$query,failed,$hiveTime\n";
print "$query,failed,$hiveTime\n";
} # end if
} # end while
} # end for
Expand All @@ -73,4 +76,3 @@ (;$)
USAGE
exit 1;
}

2 changes: 2 additions & 0 deletions sample-queries-tpcds/testbench.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- avoid caching results, useful if the benchmark is run multiple times
set hive.query.results.cache.enabled=false;
1 change: 0 additions & 1 deletion tpcds-gen/src/main/java/org/notmysock/tpcds/GenTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public int run(String[] args) throws Exception {
dsuri.getPort(),dsuri.getPath(),
dsuri.getQuery(),"dsdgen");
Configuration conf = getConf();
conf.setInt("mapred.task.timeout",0);
conf.setInt("mapreduce.task.timeout",0);
conf.setBoolean("mapreduce.map.output.compress", true);
conf.set("mapreduce.map.output.compress.codec", "org.apache.hadoop.io.compress.GzipCodec");
Expand Down
3 changes: 3 additions & 0 deletions tpcds-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ make -j 1 -f $LOAD_FILE
echo "Loading constraints"
runcommand "$HIVE -f ddl-tpcds/bin_partitioned/add_constraints.sql --hivevar DB=${DATABASE}"

echo "Computing statistics"
runcommand "$HIVE -f ddl-tpch/bin_partitioned/analyze.sql --hivevar DB=${DATABASE}"

echo "Data loaded into database ${DATABASE}."
1 change: 0 additions & 1 deletion tpch-gen/src/main/java/org/notmysock/tpch/GenTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public int run(String[] args) throws Exception {
dsuri.getPort(),dsuri.getPath(),
dsuri.getQuery(),"dbgen");
Configuration conf = getConf();
conf.setInt("mapred.task.timeout",0);
conf.setInt("mapreduce.task.timeout",0);
DistributedCache.addCacheArchive(link, conf);
Job job = new Job(conf, "GenTable+"+table+"_"+scale);
Expand Down