Michael Ho has uploaded this change for review. ( 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/krpc-data-stream-mgr.cc M be/src/runtime/mem-tracker-test.cc M be/src/runtime/mem-tracker.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/statestore/statestore-subscriber.cc M be/src/statestore/statestore-subscriber.h M be/src/statestore/statestore.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 22 files changed, 267 insertions(+), 246 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/12/9012/1 -- 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: newchange Gerrit-Change-Id: I48dfa5443cd771916b53541a0ffeaf1bcc7e7606 Gerrit-Change-Number: 9012 Gerrit-PatchSet: 1 Gerrit-Owner: Michael Ho <k...@cloudera.com>