This technote provides information on how to tune Cloudera's Impala with Strategy Analytics Enterprise 10.x
PARQUET FILE FORMAT
Impala can query different Hadoop file formats. The file format used for an Impala table has significant performance consequences. Some file formats include compression support that affects the size of data on the disk and, consequently, the amount of I/O and CPU resources required to deserialize data. The amounts of I/O and CPU resources required can be a limiting factor in query performance since querying often begins with moving and decompressing data.
Parquet is a column-oriented binary file format recommended by Cloudera for highly efficient processing of large-scale queries. Parquet is especially good for queries scanning particular columns within a table, for example to query "wide" tables with many columns, or to perform aggregation operations such as SUM() and AVG() that need to process most or all of the values from a column. Each data file contains the values for a set of rows (the "row group"). Within a data file, the values from each column are organized so that they are all adjacent, enabling good compression for the values from that column. Queries against a Parquet table can retrieve and analyze these values from any column quickly and with minimal I/O.
https://www.cloudera.com/content/cloudera/en/documentation/cloudera-impala/v2-0-x/topics/impala_parquet.html
More information about the benefits of the Parquet file format can be found here: http://www.slideshare.net/julienledem/th-210pledem
By default Impala will create tables in text format but can create tables in Parquet file format when specifying the “STORED AS” clause.
Impala can optimize queries on Parquet tables, especially join queries, better when statistics are available for all the tables. Issue the COMPUTE STATS statement for each table after substantial amounts of data are loaded into or appended to it. See COMPUTE STATS Statement for details.
Strategy recommends organizing tables in Impala in Parquet format for large scale analytical processing. Other file formats might provide better performance in specific use cases (e.g. a table in text format might allow for near-real time analytical processing when the underlying text file is appended by another application).
Strategy’s VLDB settings to generate PARQUET format in Temporary tables
By default Strategy will generate temporary tables in text format under the assumption that the temporary table is generally small, and a conversion into Parquet format will add more overhead than the extra processing required by using the default file format.
In specific reporting situations this behavior can be over-written on a report-by-report basis by specifying the following VLDB parameters:
VLDB Category | VLDB Property Setting | Value |
Tables | Intermediate TT | Permanent Table |
Tables | Create Post String | STORED AS PARQUET; |
Tables | Table Creation Type | Explicit |
For example:
CREATE TABLE ZZMQ00 (
MONTH_ID INT,
SUBCAT_ID DOUBLE)
STORED AS PARQUET;
INSERT INTO TABLE ZZMQ00
SELECT A12.MONTH_ID
A13.SUBCAT_ID SUBCAT_ID
FROM...... hdfs cacheadmin -addPool four_gig_pool -owner impala -limit 4000000000