OmniSciDB  dfae7c3b14
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 ChunkMetadataMap &chunk_metadata_map)
 
void setChunkMetadata (const int col, std::shared_ptr< ChunkMetadata > chunkMetadata)
 
const ChunkMetadataMapgetChunkMetadataMap () const
 
const ChunkMetadataMapgetChunkMetadataMapPhysical () 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
 
ChunkMetadataMap shadowChunkMetadataMap
 
ResultSetresultSet
 
std::shared_ptr< std::mutex > resultSetMutex
 

Private Attributes

size_t numTuples
 
ChunkMetadataMap chunkMetadataMap
 
bool synthesizedNumTuplesIsValid
 
bool synthesizedMetadataIsValid
 

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 78 of file Fragmenter.h.

Constructor & Destructor Documentation

◆ FragmentInfo()

Fragmenter_Namespace::FragmentInfo::FragmentInfo ( )
inline

Member Function Documentation

◆ getChunkMetadataMap()

const ChunkMetadataMap & Fragmenter_Namespace::FragmentInfo::getChunkMetadataMap ( ) const

Definition at line 268 of file InputMetadata.cpp.

References synthesize_metadata().

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

268  {
272  }
273  return chunkMetadataMap;
274 }
ChunkMetadataMap synthesize_metadata(const ResultSet *rows)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getChunkMetadataMapPhysical()

const ChunkMetadataMap& Fragmenter_Namespace::FragmentInfo::getChunkMetadataMapPhysical ( ) const
inline

Definition at line 100 of file Fragmenter.h.

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

100 { return chunkMetadataMap; }
+ Here is the caller graph for this function:

◆ getNumTuples()

size_t Fragmenter_Namespace::FragmentInfo::getNumTuples ( ) const

Definition at line 276 of file InputMetadata.cpp.

References CHECK_EQ.

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

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

◆ getPhysicalNumTuples()

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

Definition at line 104 of file Fragmenter.h.

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

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

◆ invalidateChunkMetadataMap()

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

Definition at line 110 of file Fragmenter.h.

◆ invalidateNumTuples()

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

Definition at line 111 of file Fragmenter.h.

◆ isEmptyPhysicalFragment()

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

Definition at line 106 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,
std::shared_ptr< ChunkMetadata chunkMetadata 
)
inline

Definition at line 94 of file Fragmenter.h.

94  {
95  chunkMetadataMap[col] = chunkMetadata;
96  }

◆ setChunkMetadataMap()

void Fragmenter_Namespace::FragmentInfo::setChunkMetadataMap ( const ChunkMetadataMap chunk_metadata_map)
inline

Definition at line 90 of file Fragmenter.h.

90  {
91  this->chunkMetadataMap = chunk_metadata_map;
92  }

◆ setPhysicalNumTuples()

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

Definition at line 108 of file Fragmenter.h.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::getFragmentsForQuery().

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

◆ setUnconditionalVacuum()

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

Definition at line 114 of file Fragmenter.h.

114  {
115  unconditionalVacuum_ = unconditionalVacuum;
116  }

Friends And Related Function Documentation

◆ InsertOrderFragmenter

friend class InsertOrderFragmenter
friend

Definition at line 133 of file Fragmenter.h.

Member Data Documentation

◆ chunkMetadataMap

ChunkMetadataMap Fragmenter_Namespace::FragmentInfo::chunkMetadataMap
mutableprivate

Definition at line 129 of file Fragmenter.h.

◆ deviceIds

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

◆ fragmentId

◆ numTuples

size_t Fragmenter_Namespace::FragmentInfo::numTuples
mutableprivate

Definition at line 128 of file Fragmenter.h.

◆ physicalTableId

int Fragmenter_Namespace::FragmentInfo::physicalTableId

◆ resultSet

ResultSet* Fragmenter_Namespace::FragmentInfo::resultSet
mutable

Definition at line 124 of file Fragmenter.h.

◆ resultSetMutex

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

Definition at line 125 of file Fragmenter.h.

◆ shadowChunkMetadataMap

ChunkMetadataMap Fragmenter_Namespace::FragmentInfo::shadowChunkMetadataMap

Definition at line 123 of file Fragmenter.h.

◆ shadowNumTuples

size_t Fragmenter_Namespace::FragmentInfo::shadowNumTuples

◆ shard

int Fragmenter_Namespace::FragmentInfo::shard

◆ synthesizedMetadataIsValid

bool Fragmenter_Namespace::FragmentInfo::synthesizedMetadataIsValid
mutableprivate

Definition at line 131 of file Fragmenter.h.

◆ synthesizedNumTuplesIsValid

bool Fragmenter_Namespace::FragmentInfo::synthesizedNumTuplesIsValid
mutableprivate

Definition at line 130 of file Fragmenter.h.

◆ unconditionalVacuum_

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

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