You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org> on 2026/06/19 11:00:43 UTC

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Aleksandr Efimov has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24485


Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................

IMPALA-15088: Add ReadOnlyIntGauge

Add ReadOnlyIntGauge as the common read-only interface for integer
gauge metrics.

SumGauge, NegatedGauge, MemTracker consumption metrics, and malloc
memory metric accessors now use the read-only interface. This lets both
IntGauge and FunctionGauge satisfy code that only needs GetValue().

Replace the derived tcmalloc total-bytes-reserved and overhead metric
classes with FunctionGauge instances.

Testing:
- git diff --check
- python3 bin/jenkins/critique-gerrit-review.py --dryrun
- focused Linux build: make java
- focused Linux build: make unified-be-test-executable
- focused Linux backend test: MetricsTest.*

Assisted-by: OpenAI Codex
Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
---
M be/src/runtime/exec-env.cc
M be/src/runtime/krpc-data-stream-mgr.h
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
M be/src/scheduling/admission-controller.cc
M be/src/util/malloc-util-gperftools.h
M be/src/util/malloc-util-libc.h
M be/src/util/malloc-util-sanitizers.h
M be/src/util/malloc-util.h
M be/src/util/memory-metrics.cc
M be/src/util/memory-metrics.h
M be/src/util/metrics-fwd.h
M be/src/util/metrics-test.cc
M be/src/util/metrics.h
14 files changed, 71 insertions(+), 62 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/85/24485/1
-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/22943/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Comment-Date: Fri, 19 Jun 2026 11:20:52 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13756/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Fri, 17 Jul 2026 19:25:40 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 1:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/runtime/krpc-data-stream-mgr.h
File be/src/runtime/krpc-data-stream-mgr.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/runtime/krpc-data-stream-mgr.h@353
PS1, Line 353:   ReadOnlyIntGauge* deserialization_queue_size_;
> For types that are subclasses of ReadOnlyIntGauge, let's leave the variable
Fixed in PS2.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-gperftools.h
File be/src/util/malloc-util-gperftools.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-gperftools.h@50
PS1, Line 50: class TcmallocMetric : public IntGauge {
> I would also make this inherit from ReadOnlyIntGauge.
Fixed in PS2.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-libc.h
File be/src/util/malloc-util-libc.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-libc.h@33
PS1, Line 33: class LibcMallocMetric : public IntGauge {
> This can inherit from ReadOnlyIntGauge as it doesn't need to support the se
Fixed in PS2.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-sanitizers.h
File be/src/util/malloc-util-sanitizers.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-sanitizers.h@33
PS1, Line 33: class SanitizerMallocMetric : public IntGauge {
> This can inherit from ReadOnlyIntGauge as it doesn't need to support the se
Fixed in PS2.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.h
File be/src/util/memory-metrics.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.h@53
PS1, Line 53:   static ReadOnlyIntGauge* TOTAL_USED;
> Since SumGauge now inherits from ReadOnlyIntGauge, I would leave this as th
Fixed in PS2.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.cc
File be/src/util/memory-metrics.cc:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.cc@47
PS1, Line 47: ReadOnlyIntGauge* AggregateMemoryMetrics::TOTAL_USED = nullptr;
> See other comment about leaving this as a SumGauge type
Fixed in PS2.



-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Comment-Date: Mon, 29 Jun 2026 11:54:16 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/23047/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Comment-Date: Mon, 29 Jun 2026 12:10:00 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 2:

Joe, thanks for the review. PS2 addresses the six comments from PS1, including the additional malloc-util-googletcmalloc.h update, and the initial checks passed. When you have time, could you take another look?


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 Jul 2026 12:30:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 2: Code-Review+2

This looks good to me, thanks for working on this!


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Fri, 17 Jul 2026 19:25:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 3: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Fri, 17 Jul 2026 23:37:12 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Hello Joe McDonnell, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24485

to look at the new patch set (#2).

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................

IMPALA-15088: Add ReadOnlyIntGauge

Add ReadOnlyIntGauge as the common read-only interface for integer
gauge metrics.

SumGauge, NegatedGauge, MemTracker consumption metrics, and malloc
memory metric accessors now use the read-only interface. This lets both
IntGauge and FunctionGauge satisfy code that only needs GetValue().

Replace the derived tcmalloc total-bytes-reserved and overhead metric
classes with FunctionGauge instances.

Testing:
- git diff --check asf-gerrit/master..HEAD
- python3 bin/jenkins/critique-gerrit-review.py --dryrun
- focused Linux build: MallocUtilGoogleTcmalloc
- focused Linux build: unified-be-test-executable
- focused Linux test: MetricsTest.* (46 tests)

Assisted-by: OpenAI Codex
Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
---
M be/src/runtime/exec-env.cc
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
M be/src/scheduling/admission-controller.cc
M be/src/util/malloc-util-googletcmalloc.h
M be/src/util/malloc-util-gperftools.h
M be/src/util/malloc-util-libc.h
M be/src/util/malloc-util-sanitizers.h
M be/src/util/malloc-util.h
M be/src/util/memory-metrics.cc
M be/src/util/metrics-fwd.h
M be/src/util/metrics-test.cc
M be/src/util/metrics.h
13 files changed, 85 insertions(+), 83 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/85/24485/2
-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 3: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Fri, 17 Jul 2026 19:25:39 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 1:

(6 comments)

Thanks for taking this on, just a few minor nits. Also, I recently merged https://github.com/apache/impala/commit/afc7224bd5a4257c9ce1a6f35141772fd3139838 , so there is an additional malloc-util file that will need to change.

I will be offline until July 8th.

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/runtime/krpc-data-stream-mgr.h
File be/src/runtime/krpc-data-stream-mgr.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/runtime/krpc-data-stream-mgr.h@353
PS1, Line 353:   ReadOnlyIntGauge* deserialization_queue_size_;
For types that are subclasses of ReadOnlyIntGauge, let's leave the variable as the more specific type. To code using this, it is just as functional, but the more specific type allows for better compiler checks.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-gperftools.h
File be/src/util/malloc-util-gperftools.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-gperftools.h@50
PS1, Line 50: class TcmallocMetric : public IntGauge {
I would also make this inherit from ReadOnlyIntGauge.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-libc.h
File be/src/util/malloc-util-libc.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-libc.h@33
PS1, Line 33: class LibcMallocMetric : public IntGauge {
This can inherit from ReadOnlyIntGauge as it doesn't need to support the set functions.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-sanitizers.h
File be/src/util/malloc-util-sanitizers.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/malloc-util-sanitizers.h@33
PS1, Line 33: class SanitizerMallocMetric : public IntGauge {
This can inherit from ReadOnlyIntGauge as it doesn't need to support the set functions.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.h
File be/src/util/memory-metrics.h:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.h@53
PS1, Line 53:   static ReadOnlyIntGauge* TOTAL_USED;
Since SumGauge now inherits from ReadOnlyIntGauge, I would leave this as the more specific type.


http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.cc
File be/src/util/memory-metrics.cc:

http://gerrit.cloudera.org:8080/#/c/24485/1/be/src/util/memory-metrics.cc@47
PS1, Line 47: ReadOnlyIntGauge* AggregateMemoryMetrics::TOTAL_USED = nullptr;
See other comment about leaving this as a SumGauge type



-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Jun 2026 19:13:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................


Patch Set 2: Code-Review+1


-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 Jul 2026 16:09:42 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-15088: Add ReadOnlyIntGauge

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24485 )

Change subject: IMPALA-15088: Add ReadOnlyIntGauge
......................................................................

IMPALA-15088: Add ReadOnlyIntGauge

Add ReadOnlyIntGauge as the common read-only interface for integer
gauge metrics.

SumGauge, NegatedGauge, MemTracker consumption metrics, and malloc
memory metric accessors now use the read-only interface. This lets both
IntGauge and FunctionGauge satisfy code that only needs GetValue().

Replace the derived tcmalloc total-bytes-reserved and overhead metric
classes with FunctionGauge instances.

Testing:
- git diff --check asf-gerrit/master..HEAD
- python3 bin/jenkins/critique-gerrit-review.py --dryrun
- focused Linux build: MallocUtilGoogleTcmalloc
- focused Linux build: unified-be-test-executable
- focused Linux test: MetricsTest.* (46 tests)

Assisted-by: OpenAI Codex
Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Reviewed-on: http://gerrit.cloudera.org:8080/24485
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/runtime/exec-env.cc
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
M be/src/scheduling/admission-controller.cc
M be/src/util/malloc-util-googletcmalloc.h
M be/src/util/malloc-util-gperftools.h
M be/src/util/malloc-util-libc.h
M be/src/util/malloc-util-sanitizers.h
M be/src/util/malloc-util.h
M be/src/util/memory-metrics.cc
M be/src/util/metrics-fwd.h
M be/src/util/metrics-test.cc
M be/src/util/metrics.h
13 files changed, 85 insertions(+), 83 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/24485
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida124aa3225ee07cf30e9f0a481477474a50c4dd
Gerrit-Change-Number: 24485
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>