Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::RuntimeProfile::HighWaterMarkCounter Class Reference

#include <runtime-profile.h>

Inheritance diagram for impala::RuntimeProfile::HighWaterMarkCounter:
Collaboration diagram for impala::RuntimeProfile::HighWaterMarkCounter:

Public Member Functions

 HighWaterMarkCounter (TUnit::type unit)
 
virtual void Add (int64_t delta)
 
bool TryAdd (int64_t delta, int64_t max)
 
virtual void Set (int64_t v)
 
int64_t current_value () const
 
void BitOr (int64_t delta)
 Use this to update if the counter is a bitmap. More...
 
virtual void Set (double value)
 
virtual int64_t value () const
 
virtual double double_value () const
 
TUnit::type unit () const
 

Protected Attributes

AtomicInt< int64_t > value_
 
TUnit::type unit_
 

Private Attributes

AtomicInt< int64_t > current_value_
 

Detailed Description

A counter that keeps track of the highest value seen (reporting that as value()) and the current value.

Definition at line 125 of file runtime-profile.h.

Constructor & Destructor Documentation

impala::RuntimeProfile::HighWaterMarkCounter::HighWaterMarkCounter ( TUnit::type  unit)
inline

Definition at line 127 of file runtime-profile.h.

Member Function Documentation

virtual void impala::RuntimeProfile::HighWaterMarkCounter::Add ( int64_t  delta)
inlinevirtual
void impala::RuntimeProfile::Counter::BitOr ( int64_t  delta)
inlineinherited

Use this to update if the counter is a bitmap.

Definition at line 98 of file runtime-profile.h.

References impala::RuntimeProfile::Counter::value_.

Referenced by impala::DiskIoMgr::ReadRange().

int64_t impala::RuntimeProfile::HighWaterMarkCounter::current_value ( ) const
inline
virtual double impala::RuntimeProfile::Counter::double_value ( ) const
inlinevirtualinherited
virtual void impala::RuntimeProfile::Counter::Set ( double  value)
inlinevirtualinherited
bool impala::RuntimeProfile::HighWaterMarkCounter::TryAdd ( int64_t  delta,
int64_t  max 
)
inline

Tries to increase the current value by delta. If current_value() + delta exceeds max, return false and current_value is not changed.

Definition at line 136 of file runtime-profile.h.

References impala::AtomicInt< T >::CompareAndSwap(), current_value_, LIKELY, impala::AtomicInt< T >::UpdateMax(), and impala::RuntimeProfile::Counter::value_.

Referenced by impala::MemTracker::TryConsume().

TUnit::type impala::RuntimeProfile::Counter::unit ( ) const
inlineinherited

Member Data Documentation

AtomicInt<int64_t> impala::RuntimeProfile::HighWaterMarkCounter::current_value_
private

The current value of the counter. value_ in the super class represents the high water mark.

Definition at line 158 of file runtime-profile.h.

Referenced by Add(), current_value(), Set(), and TryAdd().

TUnit::type impala::RuntimeProfile::Counter::unit_
protectedinherited

The documentation for this class was generated from the following file: