OmniSciDB  b24e664e58
 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 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

Fragmenter_Namespace::FragmentInfo::FragmentInfo ( )
inline

Member Function Documentation

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

Definition at line 267 of file InputMetadata.cpp.

References chunkMetadataMap, resultSet, anonymous_namespace{InputMetadata.cpp}::synthesize_metadata(), and synthesizedMetadataIsValid.

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

267  {
271  }
272  return chunkMetadataMap;
273 }
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:

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

Definition at line 102 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().

102  {
103  return chunkMetadataMap;
104  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134

+ Here is the caller graph for this function:

size_t Fragmenter_Namespace::FragmentInfo::getNumTuples ( ) const

Definition at line 275 of file InputMetadata.cpp.

References CHECK_EQ.

Referenced by QueryFragmentDescriptor::checkDeviceMemoryUsage(), anonymous_namespace{QueryFragmentDescriptor.cpp}::compute_fragment_tuple_count(), and ColumnFetcher::getOneColumnFragment().

275  {
276  std::unique_ptr<std::lock_guard<std::mutex>> lock;
277  if (resultSetMutex) {
278  lock.reset(new std::lock_guard<std::mutex>(*resultSetMutex));
279  }
282  numTuples = resultSet->rowCount();
284  }
285  return numTuples;
286 }
#define CHECK_EQ(x, y)
Definition: Logger.h:198
std::shared_ptr< std::mutex > resultSetMutex
Definition: Fragmenter.h:130

+ Here is the caller graph for this function:

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

Definition at line 108 of file Fragmenter.h.

References numTuples.

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:

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

Definition at line 114 of file Fragmenter.h.

References synthesizedMetadataIsValid.

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

Definition at line 115 of file Fragmenter.h.

References synthesizedNumTuplesIsValid.

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

Definition at line 110 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,
const ChunkMetadata chunkMetadata 
)
inline

Definition at line 96 of file Fragmenter.h.

References chunkMetadataMap.

96  {
97  chunkMetadataMap[col] = chunkMetadata;
98  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134
void Fragmenter_Namespace::FragmentInfo::setChunkMetadataMap ( const std::map< int, ChunkMetadata > &  chunkMetadataMap)
inline

Definition at line 92 of file Fragmenter.h.

References chunkMetadataMap.

92  {
94  }
std::map< int, ChunkMetadata > chunkMetadataMap
Definition: Fragmenter.h:134
void Fragmenter_Namespace::FragmentInfo::setPhysicalNumTuples ( const size_t  physNumTuples)
inline

Definition at line 112 of file Fragmenter.h.

References numTuples.

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

112 { numTuples = physNumTuples; }

+ Here is the caller graph for this function:

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

Definition at line 118 of file Fragmenter.h.

References unconditionalVacuum_.

118  {
119  unconditionalVacuum_ = unconditionalVacuum;
120  }

Friends And Related Function Documentation

friend class InsertOrderFragmenter
friend

Definition at line 138 of file Fragmenter.h.

Member Data Documentation

std::map<int, ChunkMetadata> Fragmenter_Namespace::FragmentInfo::chunkMetadataMap
mutableprivate
std::vector<int> Fragmenter_Namespace::FragmentInfo::deviceIds
std::shared_ptr<std::mutex> Fragmenter_Namespace::FragmentInfo::mutex_access_inmem_states
mutable

Definition at line 128 of file Fragmenter.h.

size_t Fragmenter_Namespace::FragmentInfo::numTuples
mutableprivate
ResultSet* Fragmenter_Namespace::FragmentInfo::resultSet
mutable

Definition at line 129 of file Fragmenter.h.

Referenced by getChunkMetadataMap().

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

Definition at line 130 of file Fragmenter.h.

std::map<int, ChunkMetadata> Fragmenter_Namespace::FragmentInfo::shadowChunkMetadataMap
bool Fragmenter_Namespace::FragmentInfo::synthesizedMetadataIsValid
mutableprivate

Definition at line 136 of file Fragmenter.h.

Referenced by getChunkMetadataMap(), and invalidateChunkMetadataMap().

bool Fragmenter_Namespace::FragmentInfo::synthesizedNumTuplesIsValid
mutableprivate

Definition at line 135 of file Fragmenter.h.

Referenced by invalidateNumTuples().

bool Fragmenter_Namespace::FragmentInfo::unconditionalVacuum_ {false}
staticprivate
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: