Michael Ho has uploaded a new patch set (#2). (
http://gerrit.cloudera.org:8080/9012 )
Change subject: IMPALA-2397: Use atomics for metrics
......................................................................
IMPALA-2397: Use atomics for metrics
This change removes the spinlock in IntGauge and IntCounter
and uses AtomicInt64 instead. As shown in IMPALA-2397, multiple
threads can be contending for the spinlocks of some global metrics
under concurrent queries.
This change also breaks up SimpleMetric into two subclasses:
- SimpleProperty:
- a value store for any primitive type (int,float,string etc).
- atomic read and write via value() and set_value() respectively.
- AtomicMetric:
- the basis of IntGauge and IntCounter. Support atomic increment
of the metric value via Increment() interface.
- atomic read and write via value() and set_value() respectively.
- only support int64_t type.
With this change, DoubleGauge is removed from the code base as the
existing use case doesn't make use of the Increment() interface so
replacing it with DoubleProperty is sufficient.
Change-Id: I48dfa5443cd771916b53541a0ffeaf1bcc7e7606
---
M be/src/exec/external-data-source-executor.cc
M be/src/rpc/TAcceptQueueServer.cpp
M be/src/rpc/thrift-server.cc
M be/src/runtime/client-cache.cc
M be/src/runtime/data-stream-mgr.cc
M be/src/runtime/exec-env.cc
M be/src/runtime/io/scan-range.cc
M be/src/runtime/krpc-data-stream-mgr.cc
M be/src/runtime/mem-tracker-test.cc
M be/src/runtime/mem-tracker.cc
M be/src/runtime/mem-tracker.h
M be/src/runtime/query-exec-mgr.cc
M be/src/runtime/query-state.cc
M be/src/runtime/tmp-file-mgr-test.cc
M be/src/runtime/tmp-file-mgr.cc
M be/src/scheduling/admission-controller.cc
M be/src/scheduling/scheduler.cc
M be/src/service/impala-server.cc
M be/src/service/session-expiry-test.cc
M be/src/statestore/statestore-subscriber.cc
M be/src/statestore/statestore-subscriber.h
M be/src/statestore/statestore.cc
M be/src/util/common-metrics.cc
M be/src/util/default-path-handlers.cc
M be/src/util/impalad-metrics.cc
M be/src/util/memory-metrics.cc
M be/src/util/memory-metrics.h
M be/src/util/metrics-test.cc
M be/src/util/metrics.h
M be/src/util/thread.cc
M common/thrift/metrics.json
31 files changed, 353 insertions(+), 334 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/12/9012/2
--
To view, visit http://gerrit.cloudera.org:8080/9012
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I48dfa5443cd771916b53541a0ffeaf1bcc7e7606
Gerrit-Change-Number: 9012
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Ho <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>