This is the documentation for Cloudera Manager 4.8.3.
Documentation for other versions is available at Cloudera Documentation.

Impala Queries

The Impala Queries page displays information about the Impala queries that have run in your cluster. You can filter the queries by time period and by specifying simple filtering expressions.

  Note: The Impala query monitoring feature requires Cloudera Impala 1.0.1 and higher.

Configuring Impala Queries

You can configure the visibility of the Impala query results and the size of the storage allocated to Impala query results.

For information on how to configure whether admin and non-admin users can view all queries, only that user's queries, or no queries, see Configuring Query Visibility

Query information is stored in-memory in a ring buffer. This has two consequences: if you restart Service Monitor, all queries are lost and older queries eventually will be dropped. For information on how to configure the query store, see Configuring Impala Query Store and Runtime Profile Maximum Size

Viewing Queries

  1. Do one of the following:
    • Select Activities > Cluster XXX > Impala service name Queries.
    • Select Services > Impala service name and click the Queries tab.
  2. Select a time range. The Impala queries in the time range are listed in the Queries list.

Queries List

Queries are ordered with the most recent at the top. Each query has summary and detail information.

A query summary includes the following properties: start and end timestamps, statement, duration, rows produced, user, coordinator, database, and query type. For example:

.

A running query displays under the start timestamp.

To cancel a running query, click the red Cancel button that displays above the Details button while a query is running. Only administrator can cancel queries and canceling a query creates an audit event. Once the page is refreshed, replaces the label.

In each query summary, the query statement is truncated if it is too long to display. To display the entire statement, hover over a query. The query entry will expand to display the entire query string. To collapse the query display, move the mouse cursor.

To display information about query predicates and possible values, hover over a field in a query. For example:

If an error occurred while processing the query, displays under the complete timestamp.

To display query details, click the Details button. If query details are not available, the button is greyed out. This occurs in the following cases:
  • The query is very simple and doesn't have interesting details.
  • The query profile storage wasn't large enough.

Filtering Queries

You filter queries by selecting a time range and specifying a filter expression in the Search box. The Search box supports type-ahead; when you type letters or press the Spacebar, drop-down lists containing expression components display.

You can use the Time Range Selector or a duration link () to set the time range. (See Time Line for details).

Filter Expressions

Filter expressions specify which queries should be displayed when you run the filter. The simplest filter expression is made up of three components:
  • Predicate - a property of the query. The available predicates, their types, whether the value supports type-ahead, and description, are enumerated in Filter Predicates.
  • Operator - the type of comparison between the property and the property value. Cloudera Manager supports the standard comparator operators: =, !=, >, <, >=, <=, and RLIKE, which does regular expression matching as specified in the Java Pattern class documentation. Numeric values can be compared with all operators. String values can be compared with =, !=, and RLIKE. Boolean values can be compare with = and !=.
  • Value - the value of the property. The value depends on the type of filter predicate. For some filter predicates, such as rowsProduced, specify numeric values; for other filter predicates, such as executing which take the Boolean values, specify either true or false. When specifying a string value, enclose the value in double quotes. For example, fileFormats="TEXT/NONE".

You create compound filter expressions using the AND and OR operators. When more than one operator is used in an expression, AND is evaluated first, then OR. To change the order of evaluation, delineate subexpressions with parentheses.

Compound Predicate Expressions

To find all the queries issued by the root user that produced over 100 rows, use the expression:
user = "root" AND rowsProduced > 100
To find all the executing queries issued by users Jack or Jill, use the expression:
executing = true AND (user = "Jack" OR user = "Jill")

Filter Predicates

Property

Value Type

Value Supports Type-Ahead?

Description

coordinatorHostId

string

N

The host coordinating the query.

database

string

N

The database on which the query was run.

executing

Boolean

Y

Whether the query is currently executing.

fileFormats

string

N

The file formats used in the query. A file format is a string of the form: File Type/Compression Type, where File Type can take the values: TEXT, PARQUET, SEQUENCE_FILE, and RC_FILE, and Compression Type can take the values: NONE, DEFAULT, BZIP2. For further information, see How Impala Works with Hadoop File Formats.

queryDuration

numeric

Y

The duration of the query in milliseconds.

queryId

string

N

The ID of the query.

queryState

string

Y

The current state of the query: CREATED, INITIALIZED, COMPILED, RUNNING, FINISHED, UNKNOWN, EXCEPTION. If the query has failed or been canceled, queryState will be EXCEPTION.

queryStatus

string

N

The status of the query. If the query failed, queryStatus will contain diagnostic info such as Memory limit exceeded, Failed to write row .... If canceled, queryStatus is Canceled. Otherwise, queryStatus is OK.

queryType

string

Y

The type of the query's SQL statement: DML, DDL, QUERY, UNKNOWN.

rowsProduced

numeric

N

The number of rows returned by the query.

statement

string

N

The query's SQL statement.

totalHDFSBytesReadShortCircuit

numeric

N

The total number of bytes (in GiB) read from HDFS by the query that used short-circuit reads.

totalHDFSBytesReadShortCircuitPercentage

numeric

N

The percentage of all bytes (in GiB) read from HDFS by the query that used short-circuit reads.

totalHDFSBytesRead

numeric

N

The total number of bytes (in GiB) read from HDFS by the query.

totalHDFSBytesReadLocal

numeric

N

The total number of local bytes read (in GiB) from HDFS by the query.

totalHDFSBytesReadLocalPercentage

numeric

N

The percentage of all bytes read from HDFS by the query that were local.

totalHDFSBytesReadPerSecond

numeric

N

The overall HDFS read throughput (in B/s) of the query.

totalHBaseBytesRead

numeric

N

The total number of bytes read from HBase by the query.

totalHBaseBytesReadPerSecond

numeric

N

The overall HBase read throughput (in B/s) of the query.

totalHDFSBytesSkipped

numeric

N

The total number of bytes that had to be skipped by the query while reading from HDFS. Any number above zero may indicate a problem.

totalBytesStreamed

numeric

N

The total number of bytes sent between Impala daemons while processing the query.

user

string

N

The user who issued the query.

Examples

Consider the following filter expressions: user = "root", rowsProduced > 0, fileFormats RLIKE ".TEXT.*", and executing = true. In the examples:

  • The filter predicates are user, rowsProduced, fileFormats, and executing.
  • The operators are =, >, and RLIKE.
  • The filter values are root, 0, .TEXT.*, and true.

Constructing and Running a Filter

  1. Do one of the following:
    • Click the to the right of the Search button to display a list of sample and recently used filters, and select a filter. When a filter sample is selected, the query filter text will be shown in the search box.
    • Start typing or press Spacebar in the Search text box. As you type, filter predicates matching the letter you type display. If you press Spacebar, standard filter predicates display. These suggestions are part of type-ahead, which helps build valid queries. For information about the predicate and supported values for each field, hover over the field in an existing query.
      1. Select a predicate. Press Spacebar to display a drop-down list of operators.
      2. Select an operator. Some predicate values support type-ahead. For those you can press Spacebar to display a drop-down list of values.
      3. Select or specify a value.
  2. Press Enter or click Search. The Queries list displays the queries that match the specified filter.