OmniSciDB  04ee39c94c
Fragmenter_Namespace::FragmentInfo Class Reference

Used by Fragmenter classes to store info about each fragment - the fragment id and number of tuples(rows) currently stored by that fragment. More...

#include <Fragmenter.h>

+ Collaboration diagram for Fragmenter_Namespace::FragmentInfo:

Public Member Functions

 FragmentInfo ()
 
void setChunkMetadataMap (const std::map< int, ChunkMetadata > &chunkMetadataMap)
 
void setChunkMetadata (const int col, const ChunkMetadata &chunkMetadata)
 
const std::map< int, ChunkMetadata > & getChunkMetadataMap () const
 
const std::map< int, ChunkMetadata > & getChunkMetadataMapPhysical () const
 
size_t getNumTuples () const
 
size_t getPhysicalNumTuples () const
 
bool isEmptyPhysicalFragment () const
 
void setPhysicalNumTuples (const size_t physNumTuples)
 
void invalidateChunkMetadataMap () const
 
void invalidateNumTuples () const
 

Static Public Member Functions

static void setUnconditionalVacuum (const double unconditionalVacuum)
 

Public Attributes

int fragmentId
 
size_t shadowNumTuples
 
std::vector< int > deviceIds
 
int physicalTableId
 
int shard
 
std::map< int, ChunkMetadatashadowChunkMetadataMap
 
std::shared_ptr< std::mutex > mutex_access_inmem_states
 
ResultSetresultSet
 
std::shared_ptr< std::mutex > resultSetMutex
 

Private Attributes

size_t numTuples
 
std::map< int, ChunkMetadatachunkMetadataMap
 
bool synthesizedNumTuplesIsValid
 
bool synthesizedMetadataIsValid
 
std::shared_ptr< std::mutex > updateMutex_ {new std::mutex}
 

Static Private Attributes

static bool unconditionalVacuum_ {false}
 

Friends

class InsertOrderFragmenter
 

Detailed Description

Used by Fragmenter classes to store info about each fragment - the fragment id and number of tuples(rows) currently stored by that fragment.

Definition at line 79 of file Fragmenter.h.

Constructor & Destructor Documentation

◆ FragmentInfo()

Fragmenter_Namespace::FragmentInfo::FragmentInfo ( )
inline

Member Function Documentation

◆ getChunkMetadataMap()

const std::map< int, ChunkMetadata > & Fragmenter_Namespace::FragmentInfo::getChunkMetadataMap ( ) const

Definition at line 266 of file InputMetadata.cpp.

References anonymous_namespace{InputMetadata.cpp}::synthesize_metadata().

Referenced by ColumnFetcher::getOneColumnFragment(), and Executor::skipFragment().

266  {
270  }
271  return chunkMetadataMap;
272 }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134
std::map< int, ChunkMetadata > synthesize_metadata(const ResultSet *rows)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getChunkMetadataMapPhysical()

const std::map<int, ChunkMetadata>& Fragmenter_Namespace::FragmentInfo::getChunkMetadataMapPhysical ( ) const
inline

Definition at line 102 of file Fragmenter.h.

Referenced by Fragmenter_Namespace::get_chunks(), Fragmenter_Namespace::InsertOrderFragmenter::getChunksForAllColumns(), Fragmenter_Namespace::set_chunk_metadata(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata().

102  {
103  return chunkMetadataMap;
104  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134
+ Here is the caller graph for this function:

◆ getNumTuples()

size_t Fragmenter_Namespace::FragmentInfo::getNumTuples ( ) const

Definition at line 274 of file InputMetadata.cpp.

References CHECK_EQ.

Referenced by QueryFragmentDescriptor::checkDeviceMemoryUsage(), and ColumnFetcher::getOneColumnFragment().

274  {
275  std::unique_ptr<std::lock_guard<std::mutex>> lock;
276  if (resultSetMutex) {
277  lock.reset(new std::lock_guard<std::mutex>(*resultSetMutex));
278  }
281  numTuples = resultSet->rowCount();
283  }
284  return numTuples;
285 }
#define CHECK_EQ(x, y)
Definition: Logger.h:195
std::shared_ptr< std::mutex > resultSetMutex
Definition: Fragmenter.h:130
+ Here is the caller graph for this function:

◆ getPhysicalNumTuples()

size_t Fragmenter_Namespace::FragmentInfo::getPhysicalNumTuples ( ) const
inline

Definition at line 108 of file Fragmenter.h.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::vacuum_fixlen_rows(), and Fragmenter_Namespace::InsertOrderFragmenter::vacuum_varlen_rows().

108 { return numTuples; }
+ Here is the caller graph for this function:

◆ invalidateChunkMetadataMap()

void Fragmenter_Namespace::FragmentInfo::invalidateChunkMetadataMap ( ) const
inline

Definition at line 114 of file Fragmenter.h.

◆ invalidateNumTuples()

void Fragmenter_Namespace::FragmentInfo::invalidateNumTuples ( ) const
inline

Definition at line 115 of file Fragmenter.h.

◆ isEmptyPhysicalFragment()

bool Fragmenter_Namespace::FragmentInfo::isEmptyPhysicalFragment ( ) const
inline

Definition at line 110 of file Fragmenter.h.

Referenced by ColumnFetcher::getOneColumnFragment().

+ Here is the caller graph for this function:

◆ setChunkMetadata()

void Fragmenter_Namespace::FragmentInfo::setChunkMetadata ( const int  col,
const ChunkMetadata chunkMetadata 
)
inline

Definition at line 96 of file Fragmenter.h.

96  {
97  chunkMetadataMap[col] = chunkMetadata;
98  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134

◆ setChunkMetadataMap()

void Fragmenter_Namespace::FragmentInfo::setChunkMetadataMap ( const std::map< int, ChunkMetadata > &  chunkMetadataMap)
inline

Definition at line 92 of file Fragmenter.h.

92  {
94  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134

◆ setPhysicalNumTuples()

void Fragmenter_Namespace::FragmentInfo::setPhysicalNumTuples ( const size_t  physNumTuples)
inline

Definition at line 112 of file Fragmenter.h.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::createNewFragment(), and Fragmenter_Namespace::InsertOrderFragmenter::getFragmentsForQuery().

112 { numTuples = physNumTuples; }
+ Here is the caller graph for this function:

◆ setUnconditionalVacuum()

static void Fragmenter_Namespace::FragmentInfo::setUnconditionalVacuum ( const double  unconditionalVacuum)
inlinestatic

Definition at line 118 of file Fragmenter.h.

Referenced by anonymous_namespace{UpdelStorageTest.cpp}::RowVacuumTestWithVarlenAndArraysN< N >::SetUp(), anonymous_namespace{UpdelStorageTest.cpp}::RowVacuumTest::SetUp(), anonymous_namespace{UpdelStorageTest.cpp}::RowVacuumTestWithVarlenAndArraysN< N >::TearDown(), and anonymous_namespace{UpdelStorageTest.cpp}::RowVacuumTest::TearDown().

118  {
119  unconditionalVacuum_ = unconditionalVacuum;
120  }
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ InsertOrderFragmenter

friend class InsertOrderFragmenter
friend

Definition at line 138 of file Fragmenter.h.

Member Data Documentation

◆ chunkMetadataMap

std::map<int, ChunkMetadata> Fragmenter_Namespace::FragmentInfo::chunkMetadataMap
mutableprivate

Definition at line 134 of file Fragmenter.h.

◆ deviceIds

std::vector<int> Fragmenter_Namespace::FragmentInfo::deviceIds

◆ fragmentId

◆ mutex_access_inmem_states

std::shared_ptr<std::mutex> Fragmenter_Namespace::FragmentInfo::mutex_access_inmem_states
mutable

Definition at line 128 of file Fragmenter.h.

◆ numTuples

size_t Fragmenter_Namespace::FragmentInfo::numTuples
mutableprivate

Definition at line 133 of file Fragmenter.h.

◆ physicalTableId

◆ resultSet

ResultSet* Fragmenter_Namespace::FragmentInfo::resultSet
mutable

Definition at line 129 of file Fragmenter.h.

◆ resultSetMutex

std::shared_ptr<std::mutex> Fragmenter_Namespace::FragmentInfo::resultSetMutex
mutable

Definition at line 130 of file Fragmenter.h.

◆ shadowChunkMetadataMap

std::map<int, ChunkMetadata> Fragmenter_Namespace::FragmentInfo::shadowChunkMetadataMap

◆ shadowNumTuples

◆ shard

◆ synthesizedMetadataIsValid

bool Fragmenter_Namespace::FragmentInfo::synthesizedMetadataIsValid
mutableprivate

Definition at line 136 of file Fragmenter.h.

◆ synthesizedNumTuplesIsValid

bool Fragmenter_Namespace::FragmentInfo::synthesizedNumTuplesIsValid
mutableprivate

Definition at line 135 of file Fragmenter.h.

◆ unconditionalVacuum_

bool Fragmenter_Namespace::FragmentInfo::unconditionalVacuum_ {false}
staticprivate

◆ updateMutex_

std::shared_ptr<std::mutex> Fragmenter_Namespace::FragmentInfo::updateMutex_ {new std::mutex}
mutableprivate

Definition at line 139 of file Fragmenter.h.


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