IMPALA-9989 Improve admission control pool stats logging

This work addresses the current limitation in admission controller by
appending the last known memory consumption statistics about the set of
queries running or waiting on a host or in a pool to the existing memory
exhaustion message. The statistics is logged in impalad.INFO when a
query is queued or queued and then timed out due to memory pressure in
the pool or on the host. The statistics can also be part of the query
profile.

The new memory consumption statistics can be either stats on host or
aggregated pool stats. The stats on host describes memory consumption
for every pool on a host. The aggregated pool stats describes the
aggregated memory consumption on all hosts for a pool. For each stats
type, information such as query Ids and memory consumption of up to top
5 queries is provided, in addition to the min, the max, the average and
the total memory consumption for the query set.

When a query request is queued due to memory exhaustion, the above
new consumption statistics is logged when the BE logging level is set
at 2.

When a query request is timed out due to memory exhaustion, the above
new consumption statistics is logged when the BE logging level is set
at 1.

Testing:
1. Added a new test TopNQueryCheck in admission-controller-test.cc to
   verify that the topN query memory consumption details are reported
   correctly.
2. Add two new tests in test_admission_controller.py to simulate
   queries being queued and then timed out due to pool or host memory
   pressure.
3. Added a new test TopN in mem-tracker-test.cc to
   verify that the topN query memory consumption details are computed
   correctly from a mem tracker hierarchy.
4. Ran Core tests successfully.

Change-Id: Id995a9d044082c3b8f044e1ec25bb4c64347f781
Reviewed-on: http://gerrit.cloudera.org:8080/16220
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
10 files changed
tree: c4fa721fce50f9e535177b60d43d73f584d8399d
  1. be/
  2. bin/
  3. cmake_modules/
  4. common/
  5. docker/
  6. docs/
  7. ext-data-source/
  8. fe/
  9. impala-parent/
  10. infra/
  11. lib/
  12. query-event-hook-api/
  13. security/
  14. shaded-deps/
  15. shell/
  16. ssh_keys/
  17. testdata/
  18. tests/
  19. www/
  20. .clang-format
  21. .clang-tidy
  22. .gitattributes
  23. .gitignore
  24. buildall.sh
  25. CMakeLists.txt
  26. EXPORT_CONTROL.md
  27. LICENSE.txt
  28. LOGS.md
  29. NOTICE.txt
  30. README-build.md
  31. README.md
  32. setup.cfg
README.md

Welcome to Impala

Lightning-fast, distributed SQL queries for petabytes of data stored in Apache Hadoop clusters.

Impala is a modern, massively-distributed, massively-parallel, C++ query engine that lets you analyze, transform and combine data from a variety of data sources:

  • Best of breed performance and scalability.
  • Support for data stored in HDFS, Apache HBase, Apache Kudu, Amazon S3, Azure Data Lake Storage, Apache Hadoop Ozone and more!
  • Wide analytic SQL support, including window functions and subqueries.
  • On-the-fly code generation using LLVM to generate lightning-fast code tailored specifically to each individual query.
  • Support for the most commonly-used Hadoop file formats, including Apache Parquet and Apache ORC.
  • Support for industry-standard security protocols, including Kerberos, LDAP and TLS.
  • Apache-licensed, 100% open source.

More about Impala

To learn more about Impala as a business user, or to try Impala live or in a VM, please visit the Impala homepage. Detailed documentation for administrators and users is available at Apache Impala documentation.

If you are interested in contributing to Impala as a developer, or learning more about Impala's internals and architecture, visit the Impala wiki.

Supported Platforms

Impala only supports Linux at the moment.

Export Control Notice

This distribution uses cryptographic software and may be subject to export controls. Please refer to EXPORT_CONTROL.md for more information.

Build Instructions

See Impala's developer documentation to get started.

Detailed build notes has some detailed information on the project layout and build.