Commit Graph

81 Commits

Author SHA1 Message Date
Lenni Kuff
bed633c1ae Extract config/metastore creation from buildall + script for loading warehouse snapshot 2014-01-08 10:46:53 -08:00
Lenni Kuff
ef48f65e76 Add test framework for running Impala query tests via Python
This is the first set of changes required to start getting our functional test
infrastructure moved from JUnit to Python. After investigating a number of
option, I decided to go with a python test executor named py.test
(http://pytest.org/). It is very flexible, open source (MIT licensed), and will
enable us to do some cool things like parallel test execution.

As part of this change, we now use our "test vectors" for query test execution.
This will be very nice because it means if load the "core" dataset you know you
will be able to run the "core" query tests (specified by --exploration_strategy
when running the tests).

You will see that now each combination of table format + query exec options is
treated like an individual test case. this will make it much easier to debug
exactly where something failed.

These new tests can be run using the script at tests/run-tests.sh
2014-01-08 10:46:50 -08:00
Lenni Kuff
1e25c98fb4 Test data loading framework improvements
This change includes a number of improvements for the test data loading framework:
* Named sections for schema template definitions
* Removal of uneeded sections from schema template definitions (ex. ANALYZE TABLE)
* More granular data loading via table name filters
* Improved robustness in detecting failed data loads
* Table level constraints for specific file formats
* Re-written compute stats script
2014-01-08 10:46:49 -08:00
Henry Robinson
997df15b69 IMP-581: HBase table loading error / IMP-401: Re-enable tests for structured columns 2014-01-08 10:46:48 -08:00
Michael Ubell
8a5297a526 Add HdfsLzoTextScanner 2014-01-08 10:46:35 -08:00
Michael Ubell
85807f6169 Start a single impalad to avoid data load race 2014-01-08 10:46:18 -08:00
Michael Ubell
325a2f01ad Add refresh to load script 2014-01-08 10:46:18 -08:00
Michael Ubell
37aaf06f79 IMP-390 Get rid of test dependencies on InProcessQE and Runquery 2014-01-08 10:46:18 -08:00
Michael Ubell
0c4f025a5e Fix loading of nulltable data, remove loading functional-planner data 2014-01-08 10:45:58 -08:00
Michael Ubell
bf57ae27a5 IMP-291 Read sequence file to next sync mark when; ragged columns 2014-01-08 10:45:57 -08:00
Michael Ubell
0e714f5720 Add error recovery to sequence files. 2014-01-08 10:45:07 -08:00
Henry Robinson
afc30baf52 Impalad for Trevni loading shouldn't use a state-store 2014-01-08 10:44:51 -08:00
Henry Robinson
30653278b4 run-query should not start a state-store client by default 2014-01-08 10:44:50 -08:00
Nong Li
cbb06c191c Undo load dependent tables change. 2014-01-08 10:44:39 -08:00
Nong Li
81bba16dac Parallel scanners. 2014-01-08 10:44:38 -08:00
Lenni Kuff
6e07e0b8d8 Added support for generating ANALYZE TABLE ... COMPUTE STATISTICS statements during data loading
Add support for generating ANALYZE TABLE ... COMPUTE STATISTICS statements to the data loading
workflow. This allows for capturing simple table stats such as number of rows, number of
partitions, and table size in bytes. These are stored into a new mysql database with the same
name as the metastore except with a '_Stats' suffix. If using Derby a new database results are
stored in a new derby database.
2014-01-08 10:44:34 -08:00
Alan Choi
3d9808d7a6 Upgrade HDFS past the build which contains disk id api 2014-01-08 10:44:31 -08:00
Michael Ubell
1a05c4e776 Chage to use impalad for data loading. 2014-01-08 10:44:29 -08:00
Lenni Kuff
04edc8f534 Update benchmark tests to run against generic workload, data loading with scale factor, +more
This change updates the run-benchmark script to enable it to target one or more
workloads. Now benchmarks can be run like:

./run-benchmark --workloads=hive-benchmark,tpch

We lookup the workload in the workloads directory, then read the associated
query .test files and start executing them.

To ensure the queries are not duplicated between benchmark and query tests, I
moved all existing queries (under fe/src/test/resources/* to the workloads
directory. You do NOT need to look through all the .test files, I've just moved
them. The one new file is the 'hive-benchmark.test' which contains the hive
benchmark queries.

Also added support for generating schema for different scale factors as well as
executing against these scale factors. For example, let's say we have a dataset
with a scale factor called "SF1". We would first generate the schema using:

./generate_schema_statements --workload=<workload> --scale_factor="SF3"
This will create tables with a unique names from the other scale factors.

Run the generated .sql file to load the data. Alternatively, the data can loaded
by running a new python script:
./bin/load-data.py -w <workload1>,<workload2> -e <exploration strategy> -s [scale factor]
For example: load-data.sh -w tpch -e core -s SF3

Then run against this:
./run-benchmark --workloads=<workload> --scale_factor=SF3

This changeset also includes a few other minor tweaks to some of the test
scripts.

Change-Id: Ife8a8d91567d75c9612be37bec96c1e7780f50d6
2014-01-08 10:44:22 -08:00
Michael Ubell
81d54e85e5 Change trevni data loading to avoid possible connection issues. 2014-01-08 10:44:21 -08:00
Michael Ubell
ede83a84b2 Make the trevni load script exit on error. 2014-01-08 10:44:20 -08:00
Michael Ubell
bc7eff1240 Kill off planserver after loading trevni files so jenkins is happy 2014-01-08 10:44:20 -08:00
Michael Ubell
02d63d8dc3 Trevni file support 2014-01-08 10:44:19 -08:00
Lenni Kuff
84d91fca4f Fix sequence file data loading for the alltypesmixedformat table
Moved this out of the data loading framework because it is kind of a special
case. I will consider how we can update the framework to address mixed format
tables.
2014-01-08 10:44:18 -08:00
Lenni Kuff
cef688d0fd IMP-95: Fix/recognize intermittent data load failures on jenkins
Builds now fail on data loading problems. Also a simple test fix.
2014-01-08 10:44:18 -08:00
Lenni Kuff
bf27a31f98 Move functional data loading to new framework + initial changes for workload directory structure
This change moves (almost) all the functional data loading to the new data
loading framework. This removes the need for the create.sql, load.sql, and
load-raw-data.sql file. Instead we just have the single schema template file:
testdata/datasets/functional/functional_schema_template.sql

This template can be used to generate the schema for all file formats and
compression variations. It also should help make loading data easier. Now you
can run:

bin/load-impala-data.sh "query-test" "exhaustive"

And get all data needed for running the query tests.

This change also includes the initial changes for new dataset/workload directory
structure. The new structure looks like:

testdata/workload  <- Will contain query files and test vectors/dimensions

testdata/datasets <- WIll contain the data files and schema templates

Note: This is the first part of the change to this directory structure - it's
not yet complete. # Please enter the commit message for your changes. Lines starting
2014-01-08 10:44:18 -08:00
Henry Robinson
69777066df IMP-163: Fix loading table with string partition key 2014-01-08 10:44:17 -08:00
Alan Choi
b17e24d654 A few FE fixes [rewritten by hnr]
review issue: 198

Change-Id: I84a2f38b0bce5a6f33dfb974de60c822945834e5
2014-01-08 10:44:15 -08:00
Lenni Kuff
d2bb6ae068 Rewrote TPCH queries to be more performant and better represent the official TPC-H queries + added TPCH Planner test
Rewrote TPCH queries to be more performant by removing subqueries, re-ordering joins, etc. Also did this work refering to the
official TPC-H documentation rather than the work done for Hive which overly used subqueries.
Also added a Planner test for TPCH and made a few changes so the TPC-H tests can run against ImpalaD.
2014-01-08 10:44:15 -08:00
Lenni Kuff
e49ae73236 Updated cache_tables to properly load from mini DFS data node directory
Previously the cache_tables script would run from a hardcoded data dir location
2014-01-08 10:44:14 -08:00
Lenni Kuff
7d14ece317 Added support for changing data directory of mini dfs cluster
This will allow test runs to save their state run-to-run and greatly reduce data loading time.
2014-01-08 10:44:13 -08:00
Lenni Kuff
6678d2bd50 Missed semi-colon in schema generation script 2014-01-08 10:44:13 -08:00
Lenni Kuff
e293164b37 Added TPCH functional query tests and schema generation
This adds most of the Hive TPCH queries into the functional Impala tests. This
code review doesn't actually include the TPCH data. The data set is relatively
large. Instead I updated scripts to copy the data from a data host.

This change has a few parts:
1) Update the benchmark schema generation/test vector generation to be more
generic. This way we can use the same schema creation/data loading steps for
TPCH as we do for benchmark tests.

2) Add in schema template for the TPCH workload along with test vectors and
dimensions which are used for schema generation.

3) Add in a new test file for each TPC-H query. The Hive TPCH work broke down
the queries to generate some "temp" tables, then execute using joins/selects
from these temp tables. Since creating the temp tables does some real work
it is good to execute these via Impala. Each test a) Runs all the Insert
statements to generate the temp tables b) runs the additional TPCH queries

4) Updated all the TPCH insert statements and queries to be parameterized on
$TABLE name. This way we can run the tests across all combinations of file
format/compression/etc.

5) Updated data loading

Change-Id: I6891acc4c7464eaf1dc7dbbb532ddbeb6c259bab
2014-01-08 10:44:06 -08:00
Lenni Kuff
0da77037e3 Updated Impala performance schema and test vector generation
This change updates the Impala performance schema and test vector generation
techniques. It also migrates the existing benchmark scripts that were Ruby over
to use Python. The changes has a few parts:

1) Conversion of test vector generation and benchmark statement generation from
Ruby to Python. A result of this was also to update the benchmark test vector
and dimension files to be written in CSV format (python doesn't have built-in
YAML support)

2) Standardize on the naming for benchmark tables to (somewhat match Query
tests). In general the form is:
* If file_format=text and compression=none, do not use a        table suffix
* Abbreviate sequence file as (seq) rc file as (rc) etc
* If using BLOCK compression don't append anything to table name, if using
 'record' append 'record'

3) Created a new way to adding new schemas. this is the
benchmark_schema_template.sql file. The generate_benchmark_statements.py script
reads this in and breaks up the sections. The section format is:
====
Data Set Name
---
BASE table name
---
CREATE STATEMENT Template
---
INSERT ... SELECT * format
---
LOAD Base statement
---
LOAD STATEMENT Format

Where BASE Table is a table the other file formats/compression types can be
generated from. This would generally be a local file.

The thinking is that if the files already exist in HDFS then we can just load
the file directly rather than issue an INSERT ... SELECT * statement. The
generate_benchmark_statements.py script has been updated to use this new
template as well as query HDFS for each table to determine how it should be
created. It then outputs an ideal file call load-benchmark-*-generated.sql.
Since this file is geneated dynamically we can remove the old benchmark
statement files.

4) This has been hooked into load-benchmark-data.sh and run_query has been
updated to use the new format as well
2012-07-12 23:12:20 -07:00
Lenni Kuff
1bb1890eb9 Fix data loading for AllTypesTiny table 2012-07-11 18:20:16 -07:00
Alexander Behm
097616a31d Single node execution of union. 2012-07-11 13:12:43 -07:00
Lenni Kuff
96543325a7 Fixed run-mini-dfs script to resolve issue starting cluster 2012-06-29 09:45:32 -07:00
Nong Li
3130da5fc7 Fix a few bugs with HdfsTextScanner for the benchmark queries. 2012-06-28 15:59:47 -07:00
Nong Li
6fb4072cca Add utility to warm buffer cache with all blocks for tables used in benchmark queries. 2012-06-28 10:35:53 -07:00
Henry Robinson
ce2ae276c1 Build changes for CDH4 upgrade 2012-06-22 16:05:03 -07:00
Henry Robinson
3ff3559805 Add support for per-partition file formats to front end and backend.
At the same time, this patch removes the partitionKeyRegex in favour
of explicitly sending a list of literal expressions for each file path
from the front end.
2012-06-05 12:00:09 -07:00
Michael Ubell
4a4a67ef74 Fix loading of alltypesaggnonulls. 2012-06-04 15:51:06 -07:00
Michael Ubell
3608b3fb06 RC File rewrite 2012-05-22 20:37:47 -07:00
Lenni Kuff
35951643f5 Fixed benchmark generation scripts and make_release scripts to properly
generate and execute the benchmark queries.

Updated to demove Lzo compression and add coverage of 'DefaultCodec'

Fixed up make_release to more cleanly list queries.
2012-05-17 17:40:00 -07:00
Lenni Kuff
bd2c63b69b Added scripts for generating and running benchmarks across different data sets and file formats
The scripts consist of a few parts

* generate_test_vectors.rb - This is a ruby script (I will convert it to python with a later checkin) which reads in a dimension file (in this case benchmark_dimensions.yaml) that describes the different dimensions that we want to explore. Currently the dimensions are: data set, file format, and compression algorithm. This script outputs to a file a list of "test vectors". It explores the input based on a fully exhaustive and a pairwise exploration strategy. The goal is to have a reduced set of test vectors to provide coverage but don't take as long to run as the exhaustive set of vectors. Note that I am checking in the vector outputs so this script only needs to be run if we want to generate a new set of vectors. I also am checking in a vector called benchmark_core.vector which just describes the current benchmark behavior (no compression, text file). This will allow running benchmarks with the coverage that exists today.

* testdata/bin/generate_benchmark_statements.rb - This script reads in the vector output and generates the statements required to create the benchmark schema and load the data into the benchmark tables with the proper compression/file format settings. It outputs "sql" files "create-benchmark-*.sql" and "load-benchmark-*.sql".

* updated the load-benchmark-data.sh to take parameters for which set of data to load (pairwise or exhaustive). If no parameters are passed is just loads the "core" data which is what it does now.

* Updated run_benchmark.py so that you can specify what type of run you want to do - core, exhaustive, or pairwise. It will read in the corresponding vector file and generate the proper table names for the queries to select the proper data. Also added the functionality to specify a results file to compare against.

Overall notes: By default the current behavior and coverage is maintained when running these scripts without any parameters. Everything needed is checked in so the ruby scripts don't need to be run unless we want to add dimensions at a later time.
2012-05-08 16:06:45 -07:00
Henry Robinson
2bbd4193a1 Fix PlannerTest failure 2012-05-03 17:15:16 -07:00
Henry Robinson
2af14392a6 Serial INSERT support 2012-05-03 13:44:32 -07:00
Michael Ubell
81809f908b Fix data table creation for data loading. 2012-05-02 21:21:42 -07:00
Michael Ubell
7b14187bf1 Install snappy library
add create-load-data.sh
2012-05-02 07:31:10 -07:00
Michael Ubell
62d29ff1c6 Sequence File Scanner 2012-05-01 17:48:24 -07:00