OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

Fragmenter_Namespace::FragmentInfo::FragmentInfo ( )
inline

Member Function Documentation

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

Definition at line 268 of file InputMetadata.cpp.

References chunkMetadataMap, resultSet, synthesize_metadata(), and synthesizedMetadataIsValid.

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:

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

Definition at line 100 of file Fragmenter.h.

References chunkMetadataMap.

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:

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:

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

Definition at line 104 of file Fragmenter.h.

References numTuples.

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:

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

Definition at line 110 of file Fragmenter.h.

References synthesizedMetadataIsValid.

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

Definition at line 111 of file Fragmenter.h.

References synthesizedNumTuplesIsValid.

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

Definition at line 106 of file Fragmenter.h.

References numTuples, and physicalTableId.

Referenced by ColumnFetcher::getOneColumnFragment().

+ Here is the caller graph for this function:

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

Definition at line 94 of file Fragmenter.h.

References chunkMetadataMap.

94  {
95  chunkMetadataMap[col] = chunkMetadata;
96  }
void Fragmenter_Namespace::FragmentInfo::setChunkMetadataMap ( const ChunkMetadataMap chunk_metadata_map)
inline

Definition at line 90 of file Fragmenter.h.

References chunkMetadataMap.

90  {
91  this->chunkMetadataMap = chunk_metadata_map;
92  }
void Fragmenter_Namespace::FragmentInfo::setPhysicalNumTuples ( const size_t  physNumTuples)
inline

Definition at line 108 of file Fragmenter.h.

References numTuples.

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

108 { numTuples = physNumTuples; }

+ Here is the caller graph for this function:

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

Definition at line 114 of file Fragmenter.h.

References unconditionalVacuum_.

114  {
115  unconditionalVacuum_ = unconditionalVacuum;
116  }

Friends And Related Function Documentation

friend class InsertOrderFragmenter
friend

Definition at line 133 of file Fragmenter.h.

Member Data Documentation

ChunkMetadataMap Fragmenter_Namespace::FragmentInfo::chunkMetadataMap
mutableprivate
std::vector<int> Fragmenter_Namespace::FragmentInfo::deviceIds
size_t Fragmenter_Namespace::FragmentInfo::numTuples
mutableprivate
ResultSet* Fragmenter_Namespace::FragmentInfo::resultSet
mutable

Definition at line 124 of file Fragmenter.h.

Referenced by getChunkMetadataMap().

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

Definition at line 125 of file Fragmenter.h.

ChunkMetadataMap Fragmenter_Namespace::FragmentInfo::shadowChunkMetadataMap

Definition at line 123 of file Fragmenter.h.

size_t Fragmenter_Namespace::FragmentInfo::shadowNumTuples
int Fragmenter_Namespace::FragmentInfo::shard
bool Fragmenter_Namespace::FragmentInfo::synthesizedMetadataIsValid
mutableprivate

Definition at line 131 of file Fragmenter.h.

Referenced by getChunkMetadataMap(), and invalidateChunkMetadataMap().

bool Fragmenter_Namespace::FragmentInfo::synthesizedNumTuplesIsValid
mutableprivate

Definition at line 130 of file Fragmenter.h.

Referenced by invalidateNumTuples().

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

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