Files
impala/infra/python
Andrew Sherman 21ef3e6ffe IMPALA-13638: Translate apostrophe to underscore in Prometheus metric names.
Impala has some metrics that reflect the state of the JVM. Some of these
metrics have names that are partly composed of the names of the
MemoryPoolMXBean objects in the Java virtual machine. In Jdk 8 these
are names like "Code Cache" and "PS Eden Space". In Jdk 11 these names
include apostrophe characters, for example "CodeHeap 'profiled
nmethods'". The derived metric names work OK for Impala in both the
webui and in json output. However the apostrophe character is illegal
in Prometheus metric names per
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
and these metrics cannot be consumed by Prometheus. Fix this by adding
the apostrophe to the list of characters that are mapped to underscores
when we translate the metric names for Prometheus metrics.

TESTING:

Extended the test_prometheus_metrics test to parse all generated
Prometheus metrics. Ran the test with Jdk 11 where it failed without
the server fix

Change-Id: I557b123c075dff0b14ac527de08bc6177bd2a3f6
IMPALA-13596: first cut at tidied code
Reviewed-on: http://gerrit.cloudera.org:8080/22295
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-01-06 23:38:49 +00:00
..

To install new packages:

1) Add your package to deps/requirements.txt, or deps/compiled-requirements.txt if the
   the package needs a C/C++ compiler to build . You should specify the version number
   using the "foo == x.y.z" notation so future upgrades can be done automatically.
2) Run deps/download_requirements, it will download the package to the deps dir.
3) Run the "impala-python" command, this should detect that requirements.txt changed and
   automatically rebuild the virtualenv.
4) Now in the python prompt, you should be able to import the new module.

To upgrade a package:

1) Edit deps/requirement.txt to use the version you need.
2) Go to step 2 above.