SCAN_BYTES_LIMIT Query Option (CDH 6.1 or higher only)
The SCAN_BYTES_LIMIT query option sets a limit on the bytes scanned by HDFS and HBase SCAN operations. If a query is still executing when the query’s coordinator detects that it has exceeded the limit, the query is terminated with an error. The option is intended to prevent runaway queries that scan more data than is intended.
For example, an Impala administrator could set a default value of SCAN_BYTES_LIMIT=100GB for a resource pool to automatically kill queries that scan more than 100 GB of data (see Impala Admission Control and Query Queuing for information about default query options). If a user accidentally omits a partition filter in a WHERE clause and runs a large query that scans a lot of data, the query will be automatically terminated after it scans more data than the SCAN_BYTES_LIMIT.
-
Only data actually read from the underlying storage layer is counted towards the limit. E.g. Impala’s Parquet scanner employs several techniques to skip over data in a file that is not relevant to a specific query, so often only a fraction of the file size is counted towards SCAN_BYTES_LIMIT.
-
As of Impala 3.1, bytes scanned by Kudu tablet servers are not counted towards the limit.
Because the checks are done periodically, the query may scan over the limit at times.
Syntax: SET SCAN_BYTES_LIMIT=bytes;
Type: numeric
- A numeric argument represents memory size in bytes.
- Specify a suffix of m or mb for megabytes.
- Specify a suffix of g or gb for gigabytes.
- If you specify a suffix with unrecognized formats, subsequent queries fail with an error.
Default: 0 (no limit)
Added in: CDH 6.1
<< S3_SKIP_INSERT_STAGING Query Option (CDH 5.8 or higher only) | ©2016 Cloudera, Inc. All rights reserved | SCHEDULE_RANDOM_REPLICA Query Option (CDH 5.7 or higher only) >> |
Terms and Conditions Privacy Policy |