Classes | Public Types | Public Member Functions | List of all members
mr3::RawContext Class Referenceabstract

#include <do_context.h>

Classes

struct  PerFiber
 

Public Types

using InputMetaData = absl::variant< absl::monostate, int64_t, std::string >
 std/absl monostate is an empty class that gives variant optional semantics.
 
using FreqMapRegistry = absl::flat_hash_map< std::string, detail::FreqMapWrapper >
 

Public Member Functions

virtual void Flush ()
 
virtual void CloseShard (const ShardId &sid)=0
 
void IncBy (StringPiece name, long delta)
 MR metrics - are used for monitoring, exposing statistics via http.
 
void Inc (StringPiece name)
 
StringPieceDenseMap< long > & metric_map ()
 
void UpdateMetricMap (MetricMap *metric_map)
 
void TEST_Write (const ShardId &shard_id, std::string &&record)
 Used only in tests.
 
void EmitParseError ()
 
template<class T >
FrequencyMap< T > & GetFreqMapStatistic (const std::string &map_id)
 
template<class T >
const FrequencyMap< T > * FindMaterializedFreqMapStatistic (const std::string &map_id) const
 
void InitPerFiber ()
 
const PerFiberper_fiber () const
 

Detailed Description

RawContext and its wrapper DoContext<T> provide bidirectional interface from user classes to the framework. RawContextis created per IO Context thread. In other words, RawContext is thread-local, with the internal PerFiber struct being fiber-local.

Definition at line 51 of file do_context.h.

Member Function Documentation

◆ Flush()

virtual void mr3::RawContext::Flush ( )
inlinevirtual

Flushes pending written data before closing the context. Must be called before destroying the context.

Definition at line 66 of file do_context.h.

◆ UpdateMetricMap()

void mr3::RawContext::UpdateMetricMap ( MetricMap *  metric_map)
inline

Called for every IO thread in order to fetch the metric map parts from all of them, updates into metric_map_.

Definition at line 76 of file do_context.h.


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